#402495#402495

#402495 is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.5% C 0.171 H 286.1°. Best body text is #FFFFFF at 11.03:1 contrast (WCAG AA passes).

Color values

HEX#402495
RGBrgb(64, 36, 149)
HSLhsl(255, 61%, 36%)
HSVhsv(255, 76%, 58%)
CMYKcmyk(57%, 75.8%, 0%, 41.6%)
CIE-LABlab(25.32, 42.53, -57.24)
CIE-LCHlch(25.32, 71.31, 306.61°)
OKLaboklab(37.52% 0.0476 -0.1647)
OKLCHoklch(37.52% 0.171 286.1)
XYZxyz(8.1684, 4.5212, 28.8702)
Luminance0.0452 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402495 #799524
analogous
#244195 #402495 #792495
triadic
#402495 #954024 #249540
tetradic
#402495 #952441 #799524 #249579
square
#402495 #952441 #799524 #249579
split-complementary
#402495 #957924 #419524
monochromatic
#160C32 #2B1864 #402495 #5530C6 #7A5CD8

Accessibility & contrast

On white

11.03
#402495 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.90
#402495 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402495
11.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402495#FFFFFF#000000##FFFFFF
##4024951.0011.031.9011.03
#FFFFFF11.031.0021.001.00
#0000001.9021.001.0021.00
##FFFFFF11.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F98
Deuteranopia (green-blind)
#003993
Tritanopia (blue-blind)
#18435B
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #402495;
/* rgb */ color: rgb(64, 36, 149);
/* oklch */ color: oklch(37.5% 0.171 286.1);
Tailwind
colors: {
  custom: {
    50: '#7f62b5',
    500: '#402495',
    950: '#000000',
  },
}
SCSS
$custom: #402495;
$custom-light: #7f62b5;
$custom-dark: #000000;
JSON
{
  "hex": "#402495",
  "rgb": {
    "r": 64,
    "g": 36,
    "b": 149
  },
  "hsl": {
    "h": 254.867,
    "s": 61.081,
    "l": 36.275
  },
  "oklch": {
    "l": 0.37515,
    "c": 0.17149,
    "h": 286.1
  },
  "luminance": 0.04522
}

Semantic roles & 50–950 ramp

primary
#402495
secondary
#A4BC59
accent
#E444BC
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #402495

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

Preview Lab → · Contrast checker → · Palette generator →

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