#402579#402579

#402579 is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.1% C 0.135 H 292.9°. Best body text is #FFFFFF at 11.94:1 contrast (WCAG AA passes).

Color values

HEX#402579
RGBrgb(64, 37, 121)
HSLhsl(259, 53%, 31%)
HSVhsv(259, 69%, 47%)
CMYKcmyk(47.1%, 69.4%, 0%, 52.5%)
CIE-LABlab(22.98, 33.56, -43.55)
CIE-LCHlch(22.98, 54.98, 307.61°)
OKLaboklab(35.06% 0.0525 -0.1246)
OKLCHoklch(35.06% 0.135 292.9)
XYZxyz(6.2262, 3.7934, 18.4896)
Luminance0.0379 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402579 #5E7925
analogous
#253479 #402579 #6A2579
triadic
#402579 #794025 #257940
tetradic
#402579 #792534 #5E7925 #25796A
square
#402579 #792534 #5E7925 #25796A
split-complementary
#402579 #796A25 #347925
monochromatic
#0E081B #27174A #402579 #5933A8 #764FC9

Accessibility & contrast

On white

11.94
#402579 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402579
11.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402579#FFFFFF#000000##FFFFFF
##4025791.0011.941.7611.94
#FFFFFF11.941.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00387C
Deuteranopia (green-blind)
#003577
Tritanopia (blue-blind)
#2F394B
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #402579;
/* rgb */ color: rgb(64, 37, 121);
/* oklch */ color: oklch(35.1% 0.135 292.9);
Tailwind
colors: {
  custom: {
    50: '#7a61a0',
    500: '#402579',
    950: '#000000',
  },
}
SCSS
$custom: #402579;
$custom-light: #7a61a0;
$custom-dark: #000000;
JSON
{
  "hex": "#402579",
  "rgb": {
    "r": 64,
    "g": 37,
    "b": 121
  },
  "hsl": {
    "h": 259.286,
    "s": 53.165,
    "l": 30.98
  },
  "oklch": {
    "l": 0.3506,
    "c": 0.13522,
    "h": 292.9
  },
  "luminance": 0.03794
}

Semantic roles & 50–950 ramp

primary
#402579
secondary
#8DAB4E
accent
#DD4BAE
background
#F7F5F9
surface
#EEEAF2
border
#C9C6CC
text
#0A050F
muted
#7C797E

Preview Lab

Preview with #402579

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

Preview Lab → · Contrast checker → · Palette generator →

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