#402AAA#402AAA

#402AAA is a dark, vivid violet. Relative luminance 0.056; OKLCH L 40.4% C 0.191 H 281.5°. Best body text is #FFFFFF at 9.86:1 contrast (WCAG AA passes).

Color values

HEX#402AAA
RGBrgb(64, 42, 170)
HSLhsl(250, 60%, 42%)
HSVhsv(250, 75%, 67%)
CMYKcmyk(62.4%, 75.3%, 0%, 33.3%)
CIE-LABlab(28.51, 45.74, -64.79)
CIE-LCHlch(28.51, 79.31, 305.22°)
OKLaboklab(40.38% 0.038 -0.1869)
OKLCHoklch(40.38% 0.191 281.5)
XYZxyz(10.1957, 5.6475, 38.5752)
Luminance0.0565 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AAA #94AA2A
analogous
#2A54AA #402AAA #802AAA
triadic
#402AAA #AA402A #2AAA40
tetradic
#402AAA #AA2A54 #94AA2A #2AAA80
square
#402AAA #AA2A54 #94AA2A #2AAA80
split-complementary
#402AAA #AA802A #54AA2A
monochromatic
#1B1248 #2E1E79 #402AAA #5A41D0 #8472DC

Accessibility & contrast

On white

9.86
#402AAA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.13
#402AAA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402AAA
9.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402AAA#FFFFFF#000000##FFFFFF
##402AAA1.009.862.139.86
#FFFFFF9.861.0021.001.00
#0000002.1321.001.0021.00
##FFFFFF9.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048AE
Deuteranopia (green-blind)
#003FA8
Tritanopia (blue-blind)
#004E68
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402aaa;
/* rgb */ color: rgb(64, 42, 170);
/* oklch */ color: oklch(40.4% 0.191 281.5);
Tailwind
colors: {
  custom: {
    50: '#8267c4',
    500: '#402aaa',
    950: '#000000',
  },
}
SCSS
$custom: #402aaa;
$custom-light: #8267c4;
$custom-dark: #000000;
JSON
{
  "hex": "#402aaa",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 170
  },
  "hsl": {
    "h": 250.313,
    "s": 60.377,
    "l": 41.569
  },
  "oklch": {
    "l": 0.4038,
    "c": 0.19068,
    "h": 281.5
  },
  "luminance": 0.05648
}

Semantic roles & 50–950 ramp

primary
#402AAA
secondary
#B4C36C
accent
#E444C8
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402AAA

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

Preview Lab → · Contrast checker → · Palette generator →

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