#402BA2#402BA2

#402BA2 is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.7% C 0.180 H 282.6°. Best body text is #FFFFFF at 10.07:1 contrast (WCAG AA passes).

Color values

HEX#402BA2
RGBrgb(64, 43, 162)
HSLhsl(251, 58%, 40%)
HSVhsv(251, 73%, 64%)
CMYKcmyk(60.5%, 73.5%, 0%, 36.5%)
CIE-LABlab(27.91, 42.74, -60.93)
CIE-LCHlch(27.91, 74.42, 305.05°)
OKLaboklab(39.73% 0.0391 -0.1756)
OKLCHoklch(39.73% 0.18 282.6)
XYZxyz(9.4978, 5.4257, 34.7222)
Luminance0.0543 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402BA2 #8DA22B
analogous
#2B52A2 #402BA2 #7B2BA2
triadic
#402BA2 #A2402B #2BA240
tetradic
#402BA2 #A22B52 #8DA22B #2BA27B
square
#402BA2 #A22B52 #8DA22B #2BA27B
split-complementary
#402BA2 #A27B2B #52A22B
monochromatic
#1A1141 #2D1E72 #402BA2 #573ECC #816FD9

Accessibility & contrast

On white

10.07
#402BA2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#402BA2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402BA2
10.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402BA2#FFFFFF#000000##FFFFFF
##402BA21.0010.072.0910.07
#FFFFFF10.071.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A5
Deuteranopia (green-blind)
#003EA0
Tritanopia (blue-blind)
#004C64
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #402ba2;
/* rgb */ color: rgb(64, 43, 162);
/* oklch */ color: oklch(39.7% 0.180 282.6);
Tailwind
colors: {
  custom: {
    50: '#8167bf',
    500: '#402ba2',
    950: '#000000',
  },
}
SCSS
$custom: #402ba2;
$custom-light: #8167bf;
$custom-dark: #000000;
JSON
{
  "hex": "#402ba2",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 162
  },
  "hsl": {
    "h": 250.588,
    "s": 58.049,
    "l": 40.196
  },
  "oklch": {
    "l": 0.39727,
    "c": 0.17989,
    "h": 282.6
  },
  "luminance": 0.05426
}

Semantic roles & 50–950 ramp

primary
#402BA2
secondary
#B0C069
accent
#E147C6
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402BA2

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

Preview Lab → · Contrast checker → · Palette generator →

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