#402BA1#402BA1

#402BA1 is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.6% C 0.179 H 282.7°. Best body text is #FFFFFF at 10.10:1 contrast (WCAG AA passes).

Color values

HEX#402BA1
RGBrgb(64, 43, 161)
HSLhsl(251, 58%, 40%)
HSVhsv(251, 73%, 63%)
CMYKcmyk(60.2%, 73.3%, 0%, 36.9%)
CIE-LABlab(27.82, 42.43, -60.48)
CIE-LCHlch(27.82, 73.87, 305.05°)
OKLaboklab(39.63% 0.0393 -0.1743)
OKLCHoklch(39.63% 0.179 282.7)
XYZxyz(9.4093, 5.3903, 34.2559)
Luminance0.0539 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402BA1 #8CA12B
analogous
#2B51A1 #402BA1 #7B2BA1
triadic
#402BA1 #A1402B #2BA140
tetradic
#402BA1 #A12B51 #8CA12B #2BA17B
square
#402BA1 #A12B51 #8CA12B #2BA17B
split-complementary
#402BA1 #A17B2B #51A12B
monochromatic
#1A1140 #2D1E71 #402BA1 #573ECB #816ED8

Accessibility & contrast

On white

10.10
#402BA1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#402BA1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402BA1
10.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402BA1#FFFFFF#000000##FFFFFF
##402BA11.0010.102.0810.10
#FFFFFF10.101.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.101.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402ba1;
/* rgb */ color: rgb(64, 43, 161);
/* oklch */ color: oklch(39.6% 0.179 282.7);
Tailwind
colors: {
  custom: {
    50: '#8067be',
    500: '#402ba1',
    950: '#000000',
  },
}
SCSS
$custom: #402ba1;
$custom-light: #8067be;
$custom-dark: #000000;
JSON
{
  "hex": "#402ba1",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 161
  },
  "hsl": {
    "h": 250.678,
    "s": 57.843,
    "l": 40
  },
  "oklch": {
    "l": 0.3963,
    "c": 0.17865,
    "h": 282.7
  },
  "luminance": 0.05391
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402BA1

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

Preview Lab → · Contrast checker → · Palette generator →

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