#402397#402397

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

Color values

HEX#402397
RGBrgb(64, 35, 151)
HSLhsl(255, 62%, 36%)
HSVhsv(255, 77%, 59%)
CMYKcmyk(57.6%, 76.8%, 0%, 40.8%)
CIE-LABlab(25.34, 43.64, -58.44)
CIE-LCHlch(25.34, 72.94, 306.75°)
OKLaboklab(37.58% 0.0478 -0.1683)
OKLCHoklch(37.58% 0.175 285.9)
XYZxyz(8.2996, 4.5259, 29.7084)
Luminance0.0453 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402397 #7A9723
analogous
#234097 #402397 #7A2397
triadic
#402397 #974023 #239740
tetradic
#402397 #972340 #7A9723 #23977A
square
#402397 #972340 #7A9723 #23977A
split-complementary
#402397 #977A23 #409723
monochromatic
#160C34 #2B1765 #402397 #552FC9 #7B5BD9

Accessibility & contrast

On white

11.02
#402397 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#402397 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402397
11.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402397#FFFFFF#000000##FFFFFF
##4023971.0011.021.9111.02
#FFFFFF11.021.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF11.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F9A
Deuteranopia (green-blind)
#003995
Tritanopia (blue-blind)
#15445C
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #402397;
/* rgb */ color: rgb(64, 35, 151);
/* oklch */ color: oklch(37.6% 0.175 285.9);
Tailwind
colors: {
  custom: {
    50: '#7f62b7',
    500: '#402397',
    950: '#000000',
  },
}
SCSS
$custom: #402397;
$custom-light: #7f62b7;
$custom-dark: #000000;
JSON
{
  "hex": "#402397",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 151
  },
  "hsl": {
    "h": 255,
    "s": 62.366,
    "l": 36.471
  },
  "oklch": {
    "l": 0.37584,
    "c": 0.17495,
    "h": 285.9
  },
  "luminance": 0.04526
}

Semantic roles & 50–950 ramp

primary
#402397
secondary
#A4BE58
accent
#E542BD
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #402397

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

Preview Lab → · Contrast checker → · Palette generator →

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