#402D9C#402D9C

#402D9C is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.4% C 0.170 H 283.2°. Best body text is #FFFFFF at 10.13:1 contrast (WCAG AA passes).

Color values

HEX#402D9C
RGBrgb(64, 45, 156)
HSLhsl(250, 55%, 39%)
HSVhsv(250, 71%, 61%)
CMYKcmyk(59%, 71.2%, 0%, 38.8%)
CIE-LABlab(27.75, 39.73, -57.54)
CIE-LCHlch(27.75, 69.93, 304.63°)
OKLaboklab(39.44% 0.0387 -0.1657)
OKLCHoklch(39.44% 0.17 283.2)
XYZxyz(9.0516, 5.3665, 32.0049)
Luminance0.0537 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D9C #899C2D
analogous
#2D529C #402D9C #782D9C
triadic
#402D9C #9C402D #2D9C40
tetradic
#402D9C #9C2D52 #899C2D #2D9C78
square
#402D9C #9C2D52 #899C2D #2D9C78
split-complementary
#402D9C #9C782D #529C2D
monochromatic
#19123D #2D1F6D #402D9C #563FC8 #806ED5

Accessibility & contrast

On white

10.13
#402D9C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.07
#402D9C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D9C
10.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D9C#FFFFFF#000000##FFFFFF
##402D9C1.0010.132.0710.13
#FFFFFF10.131.0021.001.00
#0000002.0721.001.0021.00
##FFFFFF10.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00459F
Deuteranopia (green-blind)
#003E9A
Tritanopia (blue-blind)
#0A4B61
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #402d9c;
/* rgb */ color: rgb(64, 45, 156);
/* oklch */ color: oklch(39.4% 0.170 283.2);
Tailwind
colors: {
  custom: {
    50: '#7f68ba',
    500: '#402d9c',
    950: '#000000',
  },
}
SCSS
$custom: #402d9c;
$custom-light: #7f68ba;
$custom-dark: #000000;
JSON
{
  "hex": "#402d9c",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 156
  },
  "hsl": {
    "h": 250.27,
    "s": 55.224,
    "l": 39.412
  },
  "oklch": {
    "l": 0.3944,
    "c": 0.17015,
    "h": 283.2
  },
  "luminance": 0.05367
}

Semantic roles & 50–950 ramp

primary
#402D9C
secondary
#AEBC68
accent
#DF49C5
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402D9C

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

Preview Lab → · Contrast checker → · Palette generator →

#402D9C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva