#402497#402497

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

Color values

HEX#402497
RGBrgb(64, 36, 151)
HSLhsl(255, 61%, 37%)
HSVhsv(255, 76%, 59%)
CMYKcmyk(57.6%, 76.2%, 0%, 40.8%)
CIE-LABlab(25.52, 43.13, -58.15)
CIE-LCHlch(25.52, 72.39, 306.56°)
OKLaboklab(37.71% 0.0471 -0.1674)
OKLCHoklch(37.71% 0.174 285.7)
XYZxyz(8.3295, 4.5856, 29.7184)
Luminance0.0459 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402497 #7B9724
analogous
#244297 #402497 #7A2497
triadic
#402497 #974024 #249740
tetradic
#402497 #972442 #7B9724 #24977A
square
#402497 #972442 #7B9724 #24977A
split-complementary
#402497 #977A24 #429724
monochromatic
#160C34 #2B1866 #402497 #5530C8 #7B5DD8

Accessibility & contrast

On white

10.95
#402497 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402497
10.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402497#FFFFFF#000000##FFFFFF
##4024971.0010.951.9210.95
#FFFFFF10.951.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.951.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: #402497;
/* rgb */ color: rgb(64, 36, 151);
/* oklch */ color: oklch(37.7% 0.174 285.7);
Tailwind
colors: {
  custom: {
    50: '#7f62b7',
    500: '#402497',
    950: '#000000',
  },
}
SCSS
$custom: #402497;
$custom-light: #7f62b7;
$custom-dark: #000000;
JSON
{
  "hex": "#402497",
  "rgb": {
    "r": 64,
    "g": 36,
    "b": 151
  },
  "hsl": {
    "h": 254.609,
    "s": 61.497,
    "l": 36.667
  },
  "oklch": {
    "l": 0.37711,
    "c": 0.1739,
    "h": 285.7
  },
  "luminance": 0.04586
}

Semantic roles & 50–950 ramp

primary
#402497
secondary
#A5BD5A
accent
#E543BD
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0511
muted
#7C7A80

Preview Lab

Preview with #402497

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

Preview Lab → · Contrast checker → · Palette generator →

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