#402AAC#402AAC

#402AAC is a dark, vivid violet. Relative luminance 0.057; OKLCH L 40.6% C 0.193 H 281.2°. Best body text is #FFFFFF at 9.79:1 contrast (WCAG AA passes).

Color values

HEX#402AAC
RGBrgb(64, 42, 172)
HSLhsl(250, 61%, 42%)
HSVhsv(250, 76%, 67%)
CMYKcmyk(62.8%, 75.6%, 0%, 32.5%)
CIE-LABlab(28.70, 46.35, -65.66)
CIE-LCHlch(28.70, 80.37, 305.22°)
OKLaboklab(40.58% 0.0375 -0.1894)
OKLCHoklch(40.58% 0.193 281.2)
XYZxyz(10.3864, 5.7237, 39.5792)
Luminance0.0572 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AAC #96AC2A
analogous
#2A55AC #402AAC #812AAC
triadic
#402AAC #AC402A #2AAC40
tetradic
#402AAC #AC2A55 #96AC2A #2AAC81
square
#402AAC #AC2A55 #96AC2A #2AAC81
split-complementary
#402AAC #AC812A #55AC2A
monochromatic
#1B124A #2E1E7B #402AAC #5A42D1 #8573DD

Accessibility & contrast

On white

9.79
#402AAC on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.14
#402AAC on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402AAC
9.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AAC#FFFFFF#000000##FFFFFF
##402AAC1.009.792.149.79
#FFFFFF9.791.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048B0
Deuteranopia (green-blind)
#003FAA
Tritanopia (blue-blind)
#004F69
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #402aac;
/* rgb */ color: rgb(64, 42, 172);
/* oklch */ color: oklch(40.6% 0.193 281.2);
Tailwind
colors: {
  custom: {
    50: '#8367c6',
    500: '#402aac',
    950: '#000000',
  },
}
SCSS
$custom: #402aac;
$custom-light: #8367c6;
$custom-dark: #000000;
JSON
{
  "hex": "#402aac",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 172
  },
  "hsl": {
    "h": 250.154,
    "s": 60.748,
    "l": 41.961
  },
  "oklch": {
    "l": 0.40581,
    "c": 0.19309,
    "h": 281.2
  },
  "luminance": 0.05724
}

Semantic roles & 50–950 ramp

primary
#402AAC
secondary
#B6C46D
accent
#E444C9
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402AAC

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

Preview Lab → · Contrast checker → · Palette generator →

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