#402180#402180

#402180 is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.1% C 0.149 H 291.8°. Best body text is #FFFFFF at 12.02:1 contrast (WCAG AA passes).

Color values

HEX#402180
RGBrgb(64, 33, 128)
HSLhsl(260, 59%, 32%)
HSVhsv(260, 74%, 50%)
CMYKcmyk(50%, 74.2%, 0%, 49.8%)
CIE-LABlab(22.78, 37.88, -48.31)
CIE-LCHlch(22.78, 61.39, 308.10°)
OKLaboklab(35.11% 0.0553 -0.1386)
OKLCHoklch(35.11% 0.149 291.8)
XYZxyz(6.5534, 3.7360, 20.7937)
Luminance0.0374 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402180 #618021
analogous
#213280 #402180 #702180
triadic
#402180 #804021 #218040
tetradic
#402180 #802132 #618021 #218070
square
#402180 #802132 #618021 #218070
split-complementary
#402180 #807021 #328021
monochromatic
#0F081F #28144F #402180 #582EB1 #764BD1

Accessibility & contrast

On white

12.02
#402180 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#402180 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402180
12.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402180#FFFFFF#000000##FFFFFF
##4021801.0012.021.7512.02
#FFFFFF12.021.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF12.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003883
Deuteranopia (green-blind)
#00347E
Tritanopia (blue-blind)
#2B3A4E
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #402180;
/* rgb */ color: rgb(64, 33, 128);
/* oklch */ color: oklch(35.1% 0.149 291.8);
Tailwind
colors: {
  custom: {
    50: '#7c5fa6',
    500: '#402180',
    950: '#000000',
  },
}
SCSS
$custom: #402180;
$custom-light: #7c5fa6;
$custom-dark: #000000;
JSON
{
  "hex": "#402180",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 128
  },
  "hsl": {
    "h": 259.579,
    "s": 59.006,
    "l": 31.569
  },
  "oklch": {
    "l": 0.35109,
    "c": 0.14922,
    "h": 291.8
  },
  "luminance": 0.03736
}

Semantic roles & 50–950 ramp

primary
#402180
secondary
#91B34A
accent
#E246AF
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #402180

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

Preview Lab → · Contrast checker → · Palette generator →

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