#402CA2#402CA2

#402CA2 is a dark, vivid violet. Relative luminance 0.055; OKLCH L 39.9% C 0.179 H 282.4°. Best body text is #FFFFFF at 10.00:1 contrast (WCAG AA passes).

Color values

HEX#402CA2
RGBrgb(64, 44, 162)
HSLhsl(250, 57%, 40%)
HSVhsv(250, 73%, 64%)
CMYKcmyk(60.5%, 72.8%, 0%, 36.5%)
CIE-LABlab(28.11, 42.18, -60.60)
CIE-LCHlch(28.11, 73.84, 304.84°)
OKLaboklab(39.87% 0.0383 -0.1746)
OKLCHoklch(39.87% 0.179 282.4)
XYZxyz(9.5346, 5.4993, 34.7345)
Luminance0.0550 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402CA2 #8EA22C
analogous
#2C53A2 #402CA2 #7B2CA2
triadic
#402CA2 #A2402C #2CA240
tetradic
#402CA2 #A22C53 #8EA22C #2CA27B
square
#402CA2 #A22C53 #8EA22C #2CA27B
split-complementary
#402CA2 #A27B2C #53A22C
monochromatic
#1A1242 #2D1F72 #402CA2 #5840CB #8270D8

Accessibility & contrast

On white

10.00
#402CA2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.10
#402CA2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402CA2
10.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402CA2#FFFFFF#000000##FFFFFF
##402CA21.0010.002.1010.00
#FFFFFF10.001.0021.001.00
#0000002.1021.001.0021.00
##FFFFFF10.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A5
Deuteranopia (green-blind)
#003EA0
Tritanopia (blue-blind)
#004C64
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #402ca2;
/* rgb */ color: rgb(64, 44, 162);
/* oklch */ color: oklch(39.9% 0.179 282.4);
Tailwind
colors: {
  custom: {
    50: '#8167bf',
    500: '#402ca2',
    950: '#000000',
  },
}
SCSS
$custom: #402ca2;
$custom-light: #8167bf;
$custom-dark: #000000;
JSON
{
  "hex": "#402ca2",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 162
  },
  "hsl": {
    "h": 250.169,
    "s": 57.282,
    "l": 40.392
  },
  "oklch": {
    "l": 0.39867,
    "c": 0.1788,
    "h": 282.4
  },
  "luminance": 0.055
}

Semantic roles & 50–950 ramp

primary
#402CA2
secondary
#B1BF6A
accent
#E147C7
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402CA2

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

Preview Lab → · Contrast checker → · Palette generator →

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