#40337B#40337B

#40337B is a dark, moderate violet. Relative luminance 0.049; OKLCH L 37.6% C 0.117 H 287.7°. Best body text is #FFFFFF at 10.62:1 contrast (WCAG AA passes).

Color values

HEX#40337B
RGBrgb(64, 51, 123)
HSLhsl(251, 41%, 34%)
HSVhsv(251, 59%, 48%)
CMYKcmyk(48%, 58.5%, 0%, 51.8%)
CIE-LABlab(26.41, 25.49, -39.26)
CIE-LCHlch(26.41, 46.81, 303.00°)
OKLaboklab(37.61% 0.0357 -0.112)
OKLCHoklch(37.61% 0.118 287.7)
XYZxyz(6.8723, 4.8874, 19.3163)
Luminance0.0489 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40337B #6E7B33
analogous
#334A7B #40337B #64337B
triadic
#40337B #7B4033 #337B40
tetradic
#40337B #7B334A #6E7B33 #337B64
square
#40337B #7B334A #6E7B33 #337B64
split-complementary
#40337B #7B6433 #4A7B33
monochromatic
#130F24 #292150 #40337B #5745A6 #7868C0

Accessibility & contrast

On white

10.62
#40337B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.98
#40337B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40337B
10.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40337B#FFFFFF#000000##FFFFFF
##40337B1.0010.621.9810.62
#FFFFFF10.621.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#07407D
Deuteranopia (green-blind)
#073D79
Tritanopia (blue-blind)
#2D4351
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #40337b;
/* rgb */ color: rgb(64, 51, 123);
/* oklch */ color: oklch(37.6% 0.117 287.7);
Tailwind
colors: {
  custom: {
    50: '#796ba2',
    500: '#40337b',
    950: '#000000',
  },
}
SCSS
$custom: #40337b;
$custom-light: #796ba2;
$custom-dark: #000000;
JSON
{
  "hex": "#40337b",
  "rgb": {
    "r": 64,
    "g": 51,
    "b": 123
  },
  "hsl": {
    "h": 250.833,
    "s": 41.379,
    "l": 34.118
  },
  "oklch": {
    "l": 0.37615,
    "c": 0.1175,
    "h": 287.7
  },
  "luminance": 0.04888
}

Semantic roles & 50–950 ramp

primary
#40337B
secondary
#9BA862
accent
#D157BB
background
#F7F6FA
surface
#EEEBF3
border
#C9C6CD
text
#09060F
muted
#7B7A7F

Preview Lab

Preview with #40337B

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

Preview Lab → · Contrast checker → · Palette generator →

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