#402088#402088

#402088 is a dark, vivid violet. Relative luminance 0.039; OKLCH L 35.7% C 0.160 H 289.8°. Best body text is #FFFFFF at 11.80:1 contrast (WCAG AA passes).

Color values

HEX#402088
RGBrgb(64, 32, 136)
HSLhsl(258, 62%, 33%)
HSVhsv(258, 76%, 53%)
CMYKcmyk(52.9%, 76.5%, 0%, 46.7%)
CIE-LABlab(23.34, 40.75, -52.43)
CIE-LCHlch(23.34, 66.40, 307.86°)
OKLaboklab(35.73% 0.0543 -0.1506)
OKLCHoklch(35.73% 0.16 289.8)
XYZxyz(7.0735, 3.9003, 23.6679)
Luminance0.0390 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402088 #688820
analogous
#203488 #402088 #742088
triadic
#402088 #884020 #208840
tetradic
#402088 #882034 #688820 #208874
square
#402088 #882034 #688820 #208874
split-complementary
#402088 #887420 #348820
monochromatic
#110925 #291456 #402088 #572CBA #774DD5

Accessibility & contrast

On white

11.80
#402088 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.78
#402088 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402088
11.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402088#FFFFFF#000000##FFFFFF
##4020881.0011.801.7811.80
#FFFFFF11.801.0021.001.00
#0000001.7821.001.0021.00
##FFFFFF11.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A8B
Deuteranopia (green-blind)
#003586
Tritanopia (blue-blind)
#263C52
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #402088;
/* rgb */ color: rgb(64, 32, 136);
/* oklch */ color: oklch(35.7% 0.160 289.8);
Tailwind
colors: {
  custom: {
    50: '#7d5fac',
    500: '#402088',
    950: '#000000',
  },
}
SCSS
$custom: #402088;
$custom-light: #7d5fac;
$custom-dark: #000000;
JSON
{
  "hex": "#402088",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 136
  },
  "hsl": {
    "h": 258.462,
    "s": 61.905,
    "l": 32.941
  },
  "oklch": {
    "l": 0.35734,
    "c": 0.16012,
    "h": 289.8
  },
  "luminance": 0.03901
}

Semantic roles & 50–950 ramp

primary
#402088
secondary
#97B84C
accent
#E543B3
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402088

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

Preview Lab → · Contrast checker → · Palette generator →

#402088 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva