#402896#402896

#402896 is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.2% C 0.168 H 285.2°. Best body text is #FFFFFF at 10.70:1 contrast (WCAG AA passes).

Color values

HEX#402896
RGBrgb(64, 40, 150)
HSLhsl(253, 58%, 37%)
HSVhsv(253, 73%, 59%)
CMYKcmyk(57.3%, 73.3%, 0%, 41.2%)
CIE-LABlab(26.18, 40.68, -56.44)
CIE-LCHlch(26.18, 69.58, 305.78°)
OKLaboklab(38.15% 0.0441 -0.1624)
OKLCHoklch(38.15% 0.168 285.2)
XYZxyz(8.3765, 4.8091, 29.3351)
Luminance0.0481 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402896 #7E9628
analogous
#284796 #402896 #772896
triadic
#402896 #964028 #289640
tetradic
#402896 #962847 #7E9628 #289677
square
#402896 #962847 #7E9628 #289677
split-complementary
#402896 #967728 #479628
monochromatic
#170E35 #2B1B66 #402896 #5535C6 #7C63D5

Accessibility & contrast

On white

10.70
#402896 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#402896 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402896
10.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402896#FFFFFF#000000##FFFFFF
##4028961.0010.701.9610.70
#FFFFFF10.701.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004199
Deuteranopia (green-blind)
#003B94
Tritanopia (blue-blind)
#16465C
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402896;
/* rgb */ color: rgb(64, 40, 150);
/* oklch */ color: oklch(38.2% 0.168 285.2);
Tailwind
colors: {
  custom: {
    50: '#7f64b6',
    500: '#402896',
    950: '#000000',
  },
}
SCSS
$custom: #402896;
$custom-light: #7f64b6;
$custom-dark: #000000;
JSON
{
  "hex": "#402896",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 150
  },
  "hsl": {
    "h": 253.091,
    "s": 57.895,
    "l": 37.255
  },
  "oklch": {
    "l": 0.38151,
    "c": 0.16833,
    "h": 285.2
  },
  "luminance": 0.0481
}

Semantic roles & 50–950 ramp

primary
#402896
secondary
#A7BB5F
accent
#E147BF
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402896

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

Preview Lab → · Contrast checker → · Palette generator →

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