#402E97#402E97

#402E97 is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.1% C 0.163 H 283.8°. Best body text is #FFFFFF at 10.22:1 contrast (WCAG AA passes).

Color values

HEX#402E97
RGBrgb(64, 46, 151)
HSLhsl(250, 53%, 39%)
HSVhsv(250, 70%, 59%)
CMYKcmyk(57.6%, 69.5%, 0%, 40.8%)
CIE-LABlab(27.51, 37.57, -54.88)
CIE-LCHlch(27.51, 66.51, 304.40°)
OKLaboklab(39.13% 0.0387 -0.1579)
OKLCHoklch(39.13% 0.163 283.8)
XYZxyz(8.6756, 5.2778, 29.8337)
Luminance0.0528 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E97 #85972E
analogous
#2E5097 #402E97 #742E97
triadic
#402E97 #97402E #2E9740
tetradic
#402E97 #972E50 #85972E #2E9774
square
#402E97 #972E50 #85972E #2E9774
split-complementary
#402E97 #97742E #50972E
monochromatic
#181139 #2C2068 #402E97 #553EC4 #7E6DD2

Accessibility & contrast

On white

10.22
#402E97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.06
#402E97 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E97
10.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E97#FFFFFF#000000##FFFFFF
##402E971.0010.222.0610.22
#FFFFFF10.221.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00449A
Deuteranopia (green-blind)
#003D95
Tritanopia (blue-blind)
#14495E
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #402e97;
/* rgb */ color: rgb(64, 46, 151);
/* oklch */ color: oklch(39.1% 0.163 283.8);
Tailwind
colors: {
  custom: {
    50: '#7e68b7',
    500: '#402e97',
    950: '#000000',
  },
}
SCSS
$custom: #402e97;
$custom-light: #7e68b7;
$custom-dark: #000000;
JSON
{
  "hex": "#402e97",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 151
  },
  "hsl": {
    "h": 250.286,
    "s": 53.299,
    "l": 38.627
  },
  "oklch": {
    "l": 0.39127,
    "c": 0.16257,
    "h": 283.8
  },
  "luminance": 0.05278
}

Semantic roles & 50–950 ramp

primary
#402E97
secondary
#ACBA67
accent
#DD4BC4
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402E97

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

Preview Lab → · Contrast checker → · Palette generator →

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