#402595#402595

#402595 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.6% C 0.170 H 285.9°. Best body text is #FFFFFF at 10.96:1 contrast (WCAG AA passes).

Color values

HEX#402595
RGBrgb(64, 37, 149)
HSLhsl(254, 60%, 36%)
HSVhsv(254, 75%, 58%)
CMYKcmyk(57%, 75.2%, 0%, 41.6%)
CIE-LABlab(25.51, 42.00, -56.93)
CIE-LCHlch(25.51, 70.75, 306.42°)
OKLaboklab(37.65% 0.0468 -0.1639)
OKLCHoklch(37.65% 0.17 285.9)
XYZxyz(8.1991, 4.5826, 28.8804)
Luminance0.0458 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402595 #7A9525
analogous
#254295 #402595 #782595
triadic
#402595 #954025 #259540
tetradic
#402595 #952542 #7A9525 #259578
square
#402595 #952542 #7A9525 #259578
split-complementary
#402595 #957825 #429525
monochromatic
#160D33 #2B1964 #402595 #5531C6 #7B5ED7

Accessibility & contrast

On white

10.96
#402595 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#402595 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402595
10.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402595#FFFFFF#000000##FFFFFF
##4025951.0010.961.9210.96
#FFFFFF10.961.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.961.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402595;
/* rgb */ color: rgb(64, 37, 149);
/* oklch */ color: oklch(37.6% 0.170 285.9);
Tailwind
colors: {
  custom: {
    50: '#7f63b5',
    500: '#402595',
    950: '#000000',
  },
}
SCSS
$custom: #402595;
$custom-light: #7f63b5;
$custom-dark: #000000;
JSON
{
  "hex": "#402595",
  "rgb": {
    "r": 64,
    "g": 37,
    "b": 149
  },
  "hsl": {
    "h": 254.464,
    "s": 60.215,
    "l": 36.471
  },
  "oklch": {
    "l": 0.37646,
    "c": 0.17042,
    "h": 285.9
  },
  "luminance": 0.04583
}

Semantic roles & 50–950 ramp

primary
#402595
secondary
#A4BC5A
accent
#E344BD
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0511
muted
#7C7A80

Preview Lab

Preview with #402595

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

Preview Lab → · Contrast checker → · Palette generator →

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