#402398#402398

#402398 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.7% C 0.176 H 285.7°. Best body text is #FFFFFF at 10.98:1 contrast (WCAG AA passes).

Color values

HEX#402398
RGBrgb(64, 35, 152)
HSLhsl(255, 63%, 37%)
HSVhsv(255, 77%, 60%)
CMYKcmyk(57.9%, 77%, 0%, 40.4%)
CIE-LABlab(25.44, 43.94, -58.90)
CIE-LCHlch(25.44, 73.48, 306.72°)
OKLaboklab(37.68% 0.0476 -0.1696)
OKLCHoklch(37.68% 0.176 285.7)
XYZxyz(8.3812, 4.5586, 30.1379)
Luminance0.0456 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402398 #7B9823
analogous
#234198 #402398 #7B2398
triadic
#402398 #984023 #239840
tetradic
#402398 #982341 #7B9823 #23987B
square
#402398 #982341 #7B9823 #23987B
split-complementary
#402398 #987B23 #419823
monochromatic
#160C35 #2B1866 #402398 #552ECA #7B5CD9

Accessibility & contrast

On white

10.98
#402398 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402398
10.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402398#FFFFFF#000000##FFFFFF
##4023981.0010.981.9110.98
#FFFFFF10.981.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF10.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F9B
Deuteranopia (green-blind)
#003996
Tritanopia (blue-blind)
#14445C
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #402398;
/* rgb */ color: rgb(64, 35, 152);
/* oklch */ color: oklch(37.7% 0.176 285.7);
Tailwind
colors: {
  custom: {
    50: '#7f62b7',
    500: '#402398',
    950: '#000000',
  },
}
SCSS
$custom: #402398;
$custom-light: #7f62b7;
$custom-dark: #000000;
JSON
{
  "hex": "#402398",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 152
  },
  "hsl": {
    "h": 254.872,
    "s": 62.567,
    "l": 36.667
  },
  "oklch": {
    "l": 0.37684,
    "c": 0.17614,
    "h": 285.7
  },
  "luminance": 0.04559
}

Semantic roles & 50–950 ramp

primary
#402398
secondary
#A5BE59
accent
#E642BD
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #402398

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

Preview Lab → · Contrast checker → · Palette generator →

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