#402597#402597

#402597 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.8% C 0.173 H 285.5°. Best body text is #FFFFFF at 10.88:1 contrast (WCAG AA passes).

Color values

HEX#402597
RGBrgb(64, 37, 151)
HSLhsl(254, 61%, 37%)
HSVhsv(254, 75%, 59%)
CMYKcmyk(57.6%, 75.5%, 0%, 40.8%)
CIE-LABlab(25.70, 42.60, -57.84)
CIE-LCHlch(25.70, 71.84, 306.37°)
OKLaboklab(37.84% 0.0463 -0.1665)
OKLCHoklch(37.84% 0.173 285.5)
XYZxyz(8.3601, 4.6470, 29.7286)
Luminance0.0465 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402597 #7C9725
analogous
#254397 #402597 #792597
triadic
#402597 #974025 #259740
tetradic
#402597 #972543 #7C9725 #259779
square
#402597 #972543 #7C9725 #259779
split-complementary
#402597 #977925 #439725
monochromatic
#160D35 #2B1966 #402597 #5531C8 #7B5FD8

Accessibility & contrast

On white

10.88
#402597 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#402597 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402597
10.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402597#FFFFFF#000000##FFFFFF
##4025971.0010.881.9310.88
#FFFFFF10.881.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00409A
Deuteranopia (green-blind)
#003995
Tritanopia (blue-blind)
#15455C
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #402597;
/* rgb */ color: rgb(64, 37, 151);
/* oklch */ color: oklch(37.8% 0.173 285.5);
Tailwind
colors: {
  custom: {
    50: '#7f63b7',
    500: '#402597',
    950: '#000000',
  },
}
SCSS
$custom: #402597;
$custom-light: #7f63b7;
$custom-dark: #000000;
JSON
{
  "hex": "#402597",
  "rgb": {
    "r": 64,
    "g": 37,
    "b": 151
  },
  "hsl": {
    "h": 254.211,
    "s": 60.638,
    "l": 36.863
  },
  "oklch": {
    "l": 0.37841,
    "c": 0.17286,
    "h": 285.5
  },
  "luminance": 0.04647
}

Semantic roles & 50–950 ramp

primary
#402597
secondary
#A6BD5B
accent
#E444BE
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0511
muted
#7C7A80

Preview Lab

Preview with #402597

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

Preview Lab → · Contrast checker → · Palette generator →

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