#402C8B#402C8B

#402C8B is a dark, vivid violet. Relative luminance 0.048; OKLCH L 37.7% C 0.149 H 286.5°. Best body text is #FFFFFF at 10.76:1 contrast (WCAG AA passes).

Color values

HEX#402C8B
RGBrgb(64, 44, 139)
HSLhsl(253, 52%, 36%)
HSVhsv(253, 68%, 55%)
CMYKcmyk(54%, 68.3%, 0%, 45.5%)
CIE-LABlab(26.02, 34.96, -49.90)
CIE-LCHlch(26.02, 60.93, 305.01°)
OKLaboklab(37.73% 0.0425 -0.1433)
OKLCHoklch(37.73% 0.149 286.5)
XYZxyz(7.6739, 4.7550, 24.9346)
Luminance0.0476 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402C8B #778B2C
analogous
#2C478B #402C8B #6F2C8B
triadic
#402C8B #8B402C #2C8B40
tetradic
#402C8B #8B2C47 #778B2C #2C8B6F
square
#402C8B #8B2C47 #778B2C #2C8B6F
split-complementary
#402C8B #8B6F2C #478B2C
monochromatic
#150F2E #2B1D5D #402C8B #553BB9 #7A64CE

Accessibility & contrast

On white

10.76
#402C8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#402C8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402C8B
10.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402C8B#FFFFFF#000000##FFFFFF
##402C8B1.0010.761.9510.76
#FFFFFF10.761.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00408E
Deuteranopia (green-blind)
#003B89
Tritanopia (blue-blind)
#224457
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402c8b;
/* rgb */ color: rgb(64, 44, 139);
/* oklch */ color: oklch(37.7% 0.149 286.5);
Tailwind
colors: {
  custom: {
    50: '#7d66ae',
    500: '#402c8b',
    950: '#000000',
  },
}
SCSS
$custom: #402c8b;
$custom-light: #7d66ae;
$custom-dark: #000000;
JSON
{
  "hex": "#402c8b",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 139
  },
  "hsl": {
    "h": 252.632,
    "s": 51.913,
    "l": 35.882
  },
  "oklch": {
    "l": 0.37732,
    "c": 0.14944,
    "h": 286.5
  },
  "luminance": 0.04755
}

Semantic roles & 50–950 ramp

primary
#402C8B
secondary
#A2B45F
accent
#DB4CBD
background
#F8F6FA
surface
#EFEBF4
border
#CAC6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402C8B

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

Preview Lab → · Contrast checker → · Palette generator →

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