#40236B#40236B

#40236B is a dark, moderate violet. Relative luminance 0.034; OKLCH L 33.6% C 0.120 H 298.2°. Best body text is #FFFFFF at 12.57:1 contrast (WCAG AA passes).

Color values

HEX#40236B
RGBrgb(64, 35, 107)
HSLhsl(264, 51%, 28%)
HSVhsv(264, 67%, 42%)
CMYKcmyk(40.2%, 67.3%, 0%, 58%)
CIE-LABlab(21.41, 30.60, -37.10)
CIE-LCHlch(21.41, 48.09, 309.52°)
OKLaboklab(33.57% 0.0566 -0.1056)
OKLCHoklch(33.57% 0.12 298.2)
XYZxyz(5.3686, 3.3535, 14.2715)
Luminance0.0335 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40236B #4E6B23
analogous
#232A6B #40236B #64236B
triadic
#40236B #6B4023 #236B40
tetradic
#40236B #6B232A #4E6B23 #236B64
square
#40236B #6B232A #4E6B23 #236B64
split-complementary
#40236B #6B6423 #2A6B23
monochromatic
#0E0817 #24143D #40236B #5C3299 #7846C2

Accessibility & contrast

On white

12.57
#40236B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#40236B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40236B
12.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40236B#FFFFFF#000000##FFFFFF
##40236B1.0012.571.6712.57
#FFFFFF12.571.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00336D
Deuteranopia (green-blind)
#003369
Tritanopia (blue-blind)
#363343
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #40236b;
/* rgb */ color: rgb(64, 35, 107);
/* oklch */ color: oklch(33.6% 0.120 298.2);
Tailwind
colors: {
  custom: {
    50: '#796096',
    500: '#40236b',
    950: '#000000',
  },
}
SCSS
$custom: #40236b;
$custom-light: #796096;
$custom-dark: #000000;
JSON
{
  "hex": "#40236b",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 107
  },
  "hsl": {
    "h": 264.167,
    "s": 50.704,
    "l": 27.843
  },
  "oklch": {
    "l": 0.33571,
    "c": 0.11984,
    "h": 298.2
  },
  "luminance": 0.03354
}

Semantic roles & 50–950 ramp

primary
#40236B
secondary
#7D9E4B
accent
#DA4EA2
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#09050D
muted
#7B797E

Preview Lab

Preview with #40236B

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

Preview Lab → · Contrast checker → · Palette generator →

#40236B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva