#402AA8#402AA8

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

Color values

HEX#402AA8
RGBrgb(64, 42, 168)
HSLhsl(250, 60%, 41%)
HSVhsv(250, 75%, 66%)
CMYKcmyk(61.9%, 75%, 0%, 34.1%)
CIE-LABlab(28.31, 45.13, -63.91)
CIE-LCHlch(28.31, 78.23, 305.23°)
OKLaboklab(40.18% 0.0384 -0.1843)
OKLCHoklch(40.18% 0.188 281.8)
XYZxyz(10.0080, 5.5724, 37.5864)
Luminance0.0557 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402AA8 #92A82A
analogous
#2A53A8 #402AA8 #7F2AA8
triadic
#402AA8 #A8402A #2AA840
tetradic
#402AA8 #A82A53 #92A82A #2AA87F
square
#402AA8 #A82A53 #92A82A #2AA87F
split-complementary
#402AA8 #A87F2A #53A82A
monochromatic
#1B1246 #2D1E77 #402AA8 #5940CF #8471DB

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##402AA8#FFFFFF#000000##FFFFFF
##402AA81.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)
#0047AC
Deuteranopia (green-blind)
#003EA6
Tritanopia (blue-blind)
#004E67
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402aa8;
/* rgb */ color: rgb(64, 42, 168);
/* oklch */ color: oklch(40.2% 0.188 281.8);
Tailwind
colors: {
  custom: {
    50: '#8266c3',
    500: '#402aa8',
    950: '#000000',
  },
}
SCSS
$custom: #402aa8;
$custom-light: #8266c3;
$custom-dark: #000000;
JSON
{
  "hex": "#402aa8",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 168
  },
  "hsl": {
    "h": 250.476,
    "s": 60,
    "l": 41.176
  },
  "oklch": {
    "l": 0.40181,
    "c": 0.18827,
    "h": 281.8
  },
  "luminance": 0.05573
}

Semantic roles & 50–950 ramp

primary
#402AA8
secondary
#B3C36B
accent
#E345C7
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402AA8

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

Preview Lab → · Contrast checker → · Palette generator →

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