#402186#402186

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

Color values

HEX#402186
RGBrgb(64, 33, 134)
HSLhsl(258, 60%, 33%)
HSVhsv(258, 75%, 53%)
CMYKcmyk(52.2%, 75.4%, 0%, 47.5%)
CIE-LABlab(23.33, 39.64, -51.18)
CIE-LCHlch(23.33, 64.74, 307.76°)
OKLaboklab(35.67% 0.0539 -0.147)
OKLCHoklch(35.67% 0.157 290.1)
XYZxyz(6.9600, 3.8986, 22.9354)
Luminance0.0390 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402186 #678621
analogous
#213486 #402186 #722186
triadic
#402186 #864021 #218640
tetradic
#402186 #862134 #678621 #218672
square
#402186 #862134 #678621 #218672
split-complementary
#402186 #867221 #348621
monochromatic
#110924 #291555 #402186 #572DB7 #774ED3

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##402186#FFFFFF#000000##FFFFFF
##4021861.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)
#003989
Deuteranopia (green-blind)
#003584
Tritanopia (blue-blind)
#273C51
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #402186;
/* rgb */ color: rgb(64, 33, 134);
/* oklch */ color: oklch(35.7% 0.157 290.1);
Tailwind
colors: {
  custom: {
    50: '#7d60aa',
    500: '#402186',
    950: '#000000',
  },
}
SCSS
$custom: #402186;
$custom-light: #7d60aa;
$custom-dark: #000000;
JSON
{
  "hex": "#402186",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 134
  },
  "hsl": {
    "h": 258.416,
    "s": 60.479,
    "l": 32.745
  },
  "oklch": {
    "l": 0.35673,
    "c": 0.15658,
    "h": 290.1
  },
  "luminance": 0.03899
}

Semantic roles & 50–950 ramp

primary
#402186
secondary
#96B74C
accent
#E444B3
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402186

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

Preview Lab → · Contrast checker → · Palette generator →

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