#40239D#40239D

#40239D is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.2% C 0.182 H 284.7°. Best body text is #FFFFFF at 10.80:1 contrast (WCAG AA passes).

Color values

HEX#40239D
RGBrgb(64, 35, 157)
HSLhsl(254, 64%, 38%)
HSVhsv(254, 78%, 62%)
CMYKcmyk(59.2%, 77.7%, 0%, 38.4%)
CIE-LABlab(25.94, 45.42, -61.13)
CIE-LCHlch(25.94, 76.16, 306.61°)
OKLaboklab(38.19% 0.0462 -0.1761)
OKLCHoklch(38.19% 0.182 284.7)
XYZxyz(8.7993, 4.7258, 32.3403)
Luminance0.0473 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40239D #809D23
analogous
#23439D #40239D #7D239D
triadic
#40239D #9D4023 #239D40
tetradic
#40239D #9D2343 #809D23 #239D7D
square
#40239D #9D2343 #809D23 #239D7D
split-complementary
#40239D #9D7D23 #439D23
monochromatic
#170D39 #2C186B #40239D #542ECF #7D5FDB

Accessibility & contrast

On white

10.80
#40239D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#40239D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40239D
10.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40239D#FFFFFF#000000##FFFFFF
##40239D1.0010.801.9510.80
#FFFFFF10.801.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0041A0
Deuteranopia (green-blind)
#003A9B
Tritanopia (blue-blind)
#09465F
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40239d;
/* rgb */ color: rgb(64, 35, 157);
/* oklch */ color: oklch(38.2% 0.182 284.7);
Tailwind
colors: {
  custom: {
    50: '#8062bb',
    500: '#40239d',
    950: '#000000',
  },
}
SCSS
$custom: #40239d;
$custom-light: #8062bb;
$custom-dark: #000000;
JSON
{
  "hex": "#40239d",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 157
  },
  "hsl": {
    "h": 254.262,
    "s": 63.542,
    "l": 37.647
  },
  "oklch": {
    "l": 0.38186,
    "c": 0.18209,
    "h": 284.7
  },
  "luminance": 0.04726
}

Semantic roles & 50–950 ramp

primary
#40239D
secondary
#A8C05C
accent
#E741BF
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0B0512
muted
#7C7A81

Preview Lab

Preview with #40239D

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#40239D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva