#402CA1#402CA1

#402CA1 is a dark, vivid violet. Relative luminance 0.055; OKLCH L 39.8% C 0.178 H 282.5°. Best body text is #FFFFFF at 10.03:1 contrast (WCAG AA passes).

Color values

HEX#402CA1
RGBrgb(64, 44, 161)
HSLhsl(250, 57%, 40%)
HSVhsv(250, 73%, 63%)
CMYKcmyk(60.2%, 72.7%, 0%, 36.9%)
CIE-LABlab(28.02, 41.87, -60.15)
CIE-LCHlch(28.02, 73.29, 304.84°)
OKLaboklab(39.77% 0.0385 -0.1733)
OKLCHoklch(39.77% 0.178 282.5)
XYZxyz(9.4461, 5.4639, 34.2682)
Luminance0.0546 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402CA1 #8DA12C
analogous
#2C53A1 #402CA1 #7A2CA1
triadic
#402CA1 #A1402C #2CA140
tetradic
#402CA1 #A12C53 #8DA12C #2CA17A
square
#402CA1 #A12C53 #8DA12C #2CA17A
split-complementary
#402CA1 #A17A2C #53A12C
monochromatic
#1A1241 #2D1F71 #402CA1 #5740CB #8170D8

Accessibility & contrast

On white

10.03
#402CA1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402CA1
10.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402CA1#FFFFFF#000000##FFFFFF
##402CA11.0010.032.0910.03
#FFFFFF10.031.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A4
Deuteranopia (green-blind)
#003E9F
Tritanopia (blue-blind)
#004C63
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #402ca1;
/* rgb */ color: rgb(64, 44, 161);
/* oklch */ color: oklch(39.8% 0.178 282.5);
Tailwind
colors: {
  custom: {
    50: '#8067be',
    500: '#402ca1',
    950: '#000000',
  },
}
SCSS
$custom: #402ca1;
$custom-light: #8067be;
$custom-dark: #000000;
JSON
{
  "hex": "#402ca1",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 161
  },
  "hsl": {
    "h": 250.256,
    "s": 57.073,
    "l": 40.196
  },
  "oklch": {
    "l": 0.39771,
    "c": 0.17755,
    "h": 282.5
  },
  "luminance": 0.05465
}

Semantic roles & 50–950 ramp

primary
#402CA1
secondary
#B0BF6A
accent
#E047C6
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402CA1

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

Preview Lab → · Contrast checker → · Palette generator →

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