#402185#402185

#402185 is a dark, vivid violet. Relative luminance 0.039; OKLCH L 35.6% C 0.155 H 290.4°. Best body text is #FFFFFF at 11.84:1 contrast (WCAG AA passes).

Color values

HEX#402185
RGBrgb(64, 33, 133)
HSLhsl(259, 60%, 33%)
HSVhsv(259, 75%, 52%)
CMYKcmyk(51.9%, 75.2%, 0%, 47.8%)
CIE-LABlab(23.24, 39.35, -50.71)
CIE-LCHlch(23.24, 64.18, 307.81°)
OKLaboklab(35.58% 0.0542 -0.1456)
OKLCHoklch(35.58% 0.155 290.4)
XYZxyz(6.8906, 3.8709, 22.5698)
Luminance0.0387 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402185 #668521
analogous
#213485 #402185 #722185
triadic
#402185 #854021 #218540
tetradic
#402185 #852134 #668521 #218572
square
#402185 #852134 #668521 #218572
split-complementary
#402185 #857221 #348521
monochromatic
#110923 #281554 #402185 #582DB6 #774DD3

Accessibility & contrast

On white

11.84
#402185 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402185
11.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402185#FFFFFF#000000##FFFFFF
##4021851.0011.841.7711.84
#FFFFFF11.841.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003988
Deuteranopia (green-blind)
#003583
Tritanopia (blue-blind)
#283C51
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #402185;
/* rgb */ color: rgb(64, 33, 133);
/* oklch */ color: oklch(35.6% 0.155 290.4);
Tailwind
colors: {
  custom: {
    50: '#7c5fa9',
    500: '#402185',
    950: '#000000',
  },
}
SCSS
$custom: #402185;
$custom-light: #7c5fa9;
$custom-dark: #000000;
JSON
{
  "hex": "#402185",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 133
  },
  "hsl": {
    "h": 258.6,
    "s": 60.241,
    "l": 32.549
  },
  "oklch": {
    "l": 0.35578,
    "c": 0.15536,
    "h": 290.4
  },
  "luminance": 0.03871
}

Semantic roles & 50–950 ramp

primary
#402185
secondary
#95B64C
accent
#E344B2
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402185

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

Preview Lab → · Contrast checker → · Palette generator →

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