#402696#402696

#402696 is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.9% C 0.171 H 285.6°. Best body text is #FFFFFF at 10.85:1 contrast (WCAG AA passes).

Color values

HEX#402696
RGBrgb(64, 38, 150)
HSLhsl(254, 60%, 37%)
HSVhsv(254, 75%, 59%)
CMYKcmyk(57.3%, 74.7%, 0%, 41.2%)
CIE-LABlab(25.80, 41.77, -57.08)
CIE-LCHlch(25.80, 70.73, 306.20°)
OKLaboklab(37.88% 0.0458 -0.1643)
OKLCHoklch(37.88% 0.171 285.6)
XYZxyz(8.3108, 4.6777, 29.3132)
Luminance0.0468 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402696 #7C9626
analogous
#264496 #402696 #782696
triadic
#402696 #964026 #269640
tetradic
#402696 #962644 #7C9626 #269678
square
#402696 #962644 #7C9626 #269678
split-complementary
#402696 #967826 #449626
monochromatic
#160D34 #2B1A65 #402696 #5532C7 #7B60D7

Accessibility & contrast

On white

10.85
#402696 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#402696 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402696
10.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402696#FFFFFF#000000##FFFFFF
##4026961.0010.851.9410.85
#FFFFFF10.851.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004099
Deuteranopia (green-blind)
#003A94
Tritanopia (blue-blind)
#17455C
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #402696;
/* rgb */ color: rgb(64, 38, 150);
/* oklch */ color: oklch(37.9% 0.171 285.6);
Tailwind
colors: {
  custom: {
    50: '#7f63b6',
    500: '#402696',
    950: '#000000',
  },
}
SCSS
$custom: #402696;
$custom-light: #7f63b6;
$custom-dark: #000000;
JSON
{
  "hex": "#402696",
  "rgb": {
    "r": 64,
    "g": 38,
    "b": 150
  },
  "hsl": {
    "h": 253.929,
    "s": 59.574,
    "l": 36.863
  },
  "oklch": {
    "l": 0.37877,
    "c": 0.17055,
    "h": 285.6
  },
  "luminance": 0.04678
}

Semantic roles & 50–950 ramp

primary
#402696
secondary
#A6BC5C
accent
#E345BE
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0511
muted
#7C7A80

Preview Lab

Preview with #402696

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

Preview Lab → · Contrast checker → · Palette generator →

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