#402CA0#402CA0

#402CA0 is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.7% C 0.176 H 282.7°. Best body text is #FFFFFF at 10.07:1 contrast (WCAG AA passes).

Color values

HEX#402CA0
RGBrgb(64, 44, 160)
HSLhsl(250, 57%, 40%)
HSVhsv(250, 73%, 63%)
CMYKcmyk(60%, 72.5%, 0%, 37.3%)
CIE-LABlab(27.92, 41.56, -59.70)
CIE-LCHlch(27.92, 72.74, 304.84°)
OKLaboklab(39.67% 0.0388 -0.172)
OKLCHoklch(39.67% 0.176 282.7)
XYZxyz(9.3582, 5.4288, 33.8056)
Luminance0.0543 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402CA0 #8CA02C
analogous
#2C52A0 #402CA0 #7A2CA0
triadic
#402CA0 #A0402C #2CA040
tetradic
#402CA0 #A02C52 #8CA02C #2CA07A
square
#402CA0 #A02C52 #8CA02C #2CA07A
split-complementary
#402CA0 #A07A2C #52A02C
monochromatic
#1A1240 #2D1F70 #402CA0 #573FCA #816FD7

Accessibility & contrast

On white

10.07
#402CA0 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#402CA0 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402CA0
10.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402CA0#FFFFFF#000000##FFFFFF
##402CA01.0010.072.0910.07
#FFFFFF10.071.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A3
Deuteranopia (green-blind)
#003E9E
Tritanopia (blue-blind)
#004B63
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #402ca0;
/* rgb */ color: rgb(64, 44, 160);
/* oklch */ color: oklch(39.7% 0.176 282.7);
Tailwind
colors: {
  custom: {
    50: '#8067bd',
    500: '#402ca0',
    950: '#000000',
  },
}
SCSS
$custom: #402ca0;
$custom-light: #8067bd;
$custom-dark: #000000;
JSON
{
  "hex": "#402ca0",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 160
  },
  "hsl": {
    "h": 250.345,
    "s": 56.863,
    "l": 40
  },
  "oklch": {
    "l": 0.39675,
    "c": 0.17631,
    "h": 282.7
  },
  "luminance": 0.05429
}

Semantic roles & 50–950 ramp

primary
#402CA0
secondary
#B0BF69
accent
#E048C6
background
#F8F6FB
surface
#EFEBF7
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402CA0

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

Preview Lab → · Contrast checker → · Palette generator →

#402CA0 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva