#402CA4#402CA4

#402CA4 is a dark, vivid violet. Relative luminance 0.056; OKLCH L 40.1% C 0.181 H 282.1°. Best body text is #FFFFFF at 9.93:1 contrast (WCAG AA passes).

Color values

HEX#402CA4
RGBrgb(64, 44, 164)
HSLhsl(250, 58%, 41%)
HSVhsv(250, 73%, 64%)
CMYKcmyk(61%, 73.2%, 0%, 35.7%)
CIE-LABlab(28.30, 42.81, -61.50)
CIE-LCHlch(28.30, 74.93, 304.84°)
OKLaboklab(40.06% 0.0379 -0.1773)
OKLCHoklch(40.06% 0.181 282.1)
XYZxyz(9.7138, 5.5710, 35.6782)
Luminance0.0557 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402CA4 #90A42C
analogous
#2C54A4 #402CA4 #7C2CA4
triadic
#402CA4 #A4402C #2CA440
tetradic
#402CA4 #A42C54 #90A42C #2CA47C
square
#402CA4 #A42C54 #90A42C #2CA47C
split-complementary
#402CA4 #A47C2C #54A42C
monochromatic
#1A1243 #2D1F74 #402CA4 #5841CC #8371D9

Accessibility & contrast

On white

9.93
#402CA4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.11
#402CA4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402CA4
9.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402CA4#FFFFFF#000000##FFFFFF
##402CA41.009.932.119.93
#FFFFFF9.931.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A8
Deuteranopia (green-blind)
#003EA2
Tritanopia (blue-blind)
#004D65
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402ca4;
/* rgb */ color: rgb(64, 44, 164);
/* oklch */ color: oklch(40.1% 0.181 282.1);
Tailwind
colors: {
  custom: {
    50: '#8167c0',
    500: '#402ca4',
    950: '#000000',
  },
}
SCSS
$custom: #402ca4;
$custom-light: #8167c0;
$custom-dark: #000000;
JSON
{
  "hex": "#402ca4",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 164
  },
  "hsl": {
    "h": 250,
    "s": 57.692,
    "l": 40.784
  },
  "oklch": {
    "l": 0.4006,
    "c": 0.18128,
    "h": 282.1
  },
  "luminance": 0.05572
}

Semantic roles & 50–950 ramp

primary
#402CA4
secondary
#B2C06B
accent
#E147C7
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402CA4

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

Preview Lab → · Contrast checker → · Palette generator →

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