#402997#402997

#402997 is a dark, vivid violet. Relative luminance 0.049; OKLCH L 38.4% C 0.168 H 284.8°. Best body text is #FFFFFF at 10.60:1 contrast (WCAG AA passes).

Color values

HEX#402997
RGBrgb(64, 41, 151)
HSLhsl(253, 57%, 38%)
HSVhsv(253, 73%, 59%)
CMYKcmyk(57.6%, 72.8%, 0%, 40.8%)
CIE-LABlab(26.48, 40.44, -56.58)
CIE-LCHlch(26.48, 69.54, 305.55°)
OKLaboklab(38.39% 0.0431 -0.1628)
OKLCHoklch(38.39% 0.168 284.8)
XYZxyz(8.4915, 4.9097, 29.7724)
Luminance0.0491 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402997 #809729
analogous
#294997 #402997 #772997
triadic
#402997 #974029 #299740
tetradic
#402997 #972949 #809729 #299777
square
#402997 #972949 #809729 #299777
split-complementary
#402997 #977729 #499729
monochromatic
#170F37 #2C1C67 #402997 #5436C7 #7D65D5

Accessibility & contrast

On white

10.60
#402997 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.98
#402997 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402997
10.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402997#FFFFFF#000000##FFFFFF
##4029971.0010.601.9810.60
#FFFFFF10.601.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00429A
Deuteranopia (green-blind)
#003B95
Tritanopia (blue-blind)
#15475D
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #402997;
/* rgb */ color: rgb(64, 41, 151);
/* oklch */ color: oklch(38.4% 0.168 284.8);
Tailwind
colors: {
  custom: {
    50: '#7f65b7',
    500: '#402997',
    950: '#000000',
  },
}
SCSS
$custom: #402997;
$custom-light: #7f65b7;
$custom-dark: #000000;
JSON
{
  "hex": "#402997",
  "rgb": {
    "r": 64,
    "g": 41,
    "b": 151
  },
  "hsl": {
    "h": 252.545,
    "s": 57.292,
    "l": 37.647
  },
  "oklch": {
    "l": 0.38387,
    "c": 0.16845,
    "h": 284.8
  },
  "luminance": 0.0491
}

Semantic roles & 50–950 ramp

primary
#402997
secondary
#A8BB61
accent
#E147C0
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402997

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

Preview Lab → · Contrast checker → · Palette generator →

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