#40337A#40337A

#40337A is a dark, moderate violet. Relative luminance 0.049; OKLCH L 37.5% C 0.116 H 287.9°. Best body text is #FFFFFF at 10.65:1 contrast (WCAG AA passes).

Color values

HEX#40337A
RGBrgb(64, 51, 122)
HSLhsl(251, 41%, 34%)
HSVhsv(251, 58%, 48%)
CMYKcmyk(47.5%, 58.2%, 0%, 52.2%)
CIE-LABlab(26.34, 25.17, -38.74)
CIE-LCHlch(26.34, 46.20, 303.01°)
OKLaboklab(37.54% 0.0357 -0.1104)
OKLCHoklch(37.54% 0.116 287.9)
XYZxyz(6.8100, 4.8625, 18.9883)
Luminance0.0486 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40337A #6D7A33
analogous
#334A7A #40337A #64337A
triadic
#40337A #7A4033 #337A40
tetradic
#40337A #7A334A #6D7A33 #337A64
square
#40337A #7A334A #6D7A33 #337A64
split-complementary
#40337A #7A6433 #4A7A33
monochromatic
#130F24 #29214F #40337A #5745A5 #7868C0

Accessibility & contrast

On white

10.65
#40337A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.97
#40337A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40337A
10.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40337A#FFFFFF#000000##FFFFFF
##40337A1.0010.651.9710.65
#FFFFFF10.651.0021.001.00
#0000001.9721.001.0021.00
##FFFFFF10.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#09407C
Deuteranopia (green-blind)
#0A3C78
Tritanopia (blue-blind)
#2E4351
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #40337a;
/* rgb */ color: rgb(64, 51, 122);
/* oklch */ color: oklch(37.5% 0.116 287.9);
Tailwind
colors: {
  custom: {
    50: '#796ba1',
    500: '#40337a',
    950: '#000000',
  },
}
SCSS
$custom: #40337a;
$custom-light: #796ba1;
$custom-dark: #000000;
JSON
{
  "hex": "#40337a",
  "rgb": {
    "r": 64,
    "g": 51,
    "b": 122
  },
  "hsl": {
    "h": 250.986,
    "s": 41.04,
    "l": 33.922
  },
  "oklch": {
    "l": 0.37539,
    "c": 0.11605,
    "h": 287.9
  },
  "luminance": 0.04863
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #40337A

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

Preview Lab → · Contrast checker → · Palette generator →

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