#402182#402182

#402182 is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.3% C 0.152 H 291.2°. Best body text is #FFFFFF at 11.95:1 contrast (WCAG AA passes).

Color values

HEX#402182
RGBrgb(64, 33, 130)
HSLhsl(259, 60%, 32%)
HSVhsv(259, 75%, 51%)
CMYKcmyk(50.8%, 74.6%, 0%, 49%)
CIE-LABlab(22.96, 38.47, -49.28)
CIE-LCHlch(22.96, 62.51, 307.98°)
OKLaboklab(35.3% 0.0549 -0.1414)
OKLCHoklch(35.3% 0.152 291.2)
XYZxyz(6.6863, 3.7892, 21.4938)
Luminance0.0379 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402182 #638221
analogous
#213382 #402182 #712182
triadic
#402182 #824021 #218240
tetradic
#402182 #822133 #638221 #218271
square
#402182 #822133 #638221 #218271
split-complementary
#402182 #827121 #338221
monochromatic
#100820 #281551 #402182 #582DB3 #774CD2

Accessibility & contrast

On white

11.95
#402182 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#402182 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402182
11.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402182#FFFFFF#000000##FFFFFF
##4021821.0011.951.7611.95
#FFFFFF11.951.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003885
Deuteranopia (green-blind)
#003580
Tritanopia (blue-blind)
#2A3B4F
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #402182;
/* rgb */ color: rgb(64, 33, 130);
/* oklch */ color: oklch(35.3% 0.152 291.2);
Tailwind
colors: {
  custom: {
    50: '#7c5fa7',
    500: '#402182',
    950: '#000000',
  },
}
SCSS
$custom: #402182;
$custom-light: #7c5fa7;
$custom-dark: #000000;
JSON
{
  "hex": "#402182",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 130
  },
  "hsl": {
    "h": 259.175,
    "s": 59.509,
    "l": 31.961
  },
  "oklch": {
    "l": 0.35295,
    "c": 0.15169,
    "h": 291.2
  },
  "luminance": 0.03789
}

Semantic roles & 50–950 ramp

primary
#402182
secondary
#93B44A
accent
#E345B0
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402182

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

Preview Lab → · Contrast checker → · Palette generator →

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