#402487#402487

#402487 is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.2% C 0.154 H 289.3°. Best body text is #FFFFFF at 11.54:1 contrast (WCAG AA passes).

Color values

HEX#402487
RGBrgb(64, 36, 135)
HSLhsl(257, 58%, 34%)
HSVhsv(257, 73%, 53%)
CMYKcmyk(52.6%, 73.3%, 0%, 47.1%)
CIE-LABlab(24.00, 38.32, -50.72)
CIE-LCHlch(24.00, 63.57, 307.08°)
OKLaboklab(36.17% 0.051 -0.1456)
OKLCHoklch(36.17% 0.154 289.3)
XYZxyz(7.1171, 4.1007, 23.3335)
Luminance0.0410 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402487 #6B8724
analogous
#243987 #402487 #712487
triadic
#402487 #874024 #248740
tetradic
#402487 #872439 #6B8724 #248771
square
#402487 #872439 #6B8724 #248771
split-complementary
#402487 #877124 #398724
monochromatic
#120A26 #291757 #402487 #5731B7 #7754D1

Accessibility & contrast

On white

11.54
#402487 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.82
#402487 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402487
11.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402487#FFFFFF#000000##FFFFFF
##4024871.0011.541.8211.54
#FFFFFF11.541.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8A
Deuteranopia (green-blind)
#003785
Tritanopia (blue-blind)
#263E53
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #402487;
/* rgb */ color: rgb(64, 36, 135);
/* oklch */ color: oklch(36.2% 0.154 289.3);
Tailwind
colors: {
  custom: {
    50: '#7d61ab',
    500: '#402487',
    950: '#000000',
  },
}
SCSS
$custom: #402487;
$custom-light: #7d61ab;
$custom-dark: #000000;
JSON
{
  "hex": "#402487",
  "rgb": {
    "r": 64,
    "g": 36,
    "b": 135
  },
  "hsl": {
    "h": 256.97,
    "s": 57.895,
    "l": 33.529
  },
  "oklch": {
    "l": 0.36174,
    "c": 0.15429,
    "h": 289.3
  },
  "luminance": 0.04101
}

Semantic roles & 50–950 ramp

primary
#402487
secondary
#99B551
accent
#E147B5
background
#F8F5FA
surface
#EFEAF4
border
#CAC6CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402487

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

Preview Lab → · Contrast checker → · Palette generator →

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