#402086#402086

#402086 is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.5% C 0.158 H 290.3°. Best body text is #FFFFFF at 11.87:1 contrast (WCAG AA passes).

Color values

HEX#402086
RGBrgb(64, 32, 134)
HSLhsl(259, 61%, 33%)
HSVhsv(259, 76%, 53%)
CMYKcmyk(52.2%, 76.1%, 0%, 47.5%)
CIE-LABlab(23.15, 40.16, -51.49)
CIE-LCHlch(23.15, 65.30, 307.96°)
OKLaboklab(35.54% 0.0548 -0.1479)
OKLCHoklch(35.54% 0.158 290.3)
XYZxyz(6.9327, 3.8440, 22.9263)
Luminance0.0384 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402086 #668620
analogous
#203386 #402086 #732086
triadic
#402086 #864020 #208640
tetradic
#402086 #862033 #668620 #208673
square
#402086 #862033 #668620 #208673
split-complementary
#402086 #867320 #338620
monochromatic
#110823 #281455 #402086 #582CB7 #774CD4

Accessibility & contrast

On white

11.87
#402086 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.77
#402086 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402086
11.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402086#FFFFFF#000000##FFFFFF
##4020861.0011.871.7711.87
#FFFFFF11.871.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003989
Deuteranopia (green-blind)
#003584
Tritanopia (blue-blind)
#273C51
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #402086;
/* rgb */ color: rgb(64, 32, 134);
/* oklch */ color: oklch(35.5% 0.158 290.3);
Tailwind
colors: {
  custom: {
    50: '#7d5faa',
    500: '#402086',
    950: '#000000',
  },
}
SCSS
$custom: #402086;
$custom-light: #7d5faa;
$custom-dark: #000000;
JSON
{
  "hex": "#402086",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 134
  },
  "hsl": {
    "h": 258.824,
    "s": 61.446,
    "l": 32.549
  },
  "oklch": {
    "l": 0.35542,
    "c": 0.15771,
    "h": 290.3
  },
  "luminance": 0.03844
}

Semantic roles & 50–950 ramp

primary
#402086
secondary
#95B74B
accent
#E543B2
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402086

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

Preview Lab → · Contrast checker → · Palette generator →

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