#402C8F#402C8F

#402C8F is a dark, vivid violet. Relative luminance 0.049; OKLCH L 38.1% C 0.155 H 285.7°. Best body text is #FFFFFF at 10.63:1 contrast (WCAG AA passes).

Color values

HEX#402C8F
RGBrgb(64, 44, 143)
HSLhsl(252, 53%, 37%)
HSVhsv(252, 69%, 56%)
CMYKcmyk(55.2%, 69.2%, 0%, 43.9%)
CIE-LABlab(26.37, 36.22, -51.82)
CIE-LCHlch(26.37, 63.22, 304.95°)
OKLaboklab(38.09% 0.0419 -0.1489)
OKLCHoklch(38.09% 0.155 285.7)
XYZxyz(7.9715, 4.8741, 26.5020)
Luminance0.0488 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402C8F #7B8F2C
analogous
#2C4A8F #402C8F #722C8F
triadic
#402C8F #8F402C #2C8F40
tetradic
#402C8F #8F2C4A #7B8F2C #2C8F72
square
#402C8F #8F2C4A #7B8F2C #2C8F72
split-complementary
#402C8F #8F722C #4A8F2C
monochromatic
#160F31 #2B1E60 #402C8F #553ABE #7B66D0

Accessibility & contrast

On white

10.63
#402C8F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.98
#402C8F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402C8F
10.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402C8F#FFFFFF#000000##FFFFFF
##402C8F1.0010.631.9810.63
#FFFFFF10.631.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004192
Deuteranopia (green-blind)
#003B8D
Tritanopia (blue-blind)
#1E455A
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402c8f;
/* rgb */ color: rgb(64, 44, 143);
/* oklch */ color: oklch(38.1% 0.155 285.7);
Tailwind
colors: {
  custom: {
    50: '#7d67b1',
    500: '#402c8f',
    950: '#000000',
  },
}
SCSS
$custom: #402c8f;
$custom-light: #7d67b1;
$custom-dark: #000000;
JSON
{
  "hex": "#402c8f",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 143
  },
  "hsl": {
    "h": 252.121,
    "s": 52.941,
    "l": 36.667
  },
  "oklch": {
    "l": 0.3809,
    "c": 0.15467,
    "h": 285.7
  },
  "luminance": 0.04875
}

Semantic roles & 50–950 ramp

primary
#402C8F
secondary
#A5B661
accent
#DC4BBF
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0A0611
muted
#7C7A80

Preview Lab

Preview with #402C8F

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

Preview Lab → · Contrast checker → · Palette generator →

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