#402CA3#402CA3

#402CA3 is a dark, vivid violet. Relative luminance 0.055; OKLCH L 40.0% C 0.180 H 282.2°. Best body text is #FFFFFF at 9.97:1 contrast (WCAG AA passes).

Color values

HEX#402CA3
RGBrgb(64, 44, 163)
HSLhsl(250, 57%, 41%)
HSVhsv(250, 73%, 64%)
CMYKcmyk(60.7%, 73%, 0%, 36.1%)
CIE-LABlab(28.21, 42.49, -61.05)
CIE-LCHlch(28.21, 74.38, 304.84°)
OKLaboklab(39.96% 0.0381 -0.176)
OKLCHoklch(39.96% 0.18 282.2)
XYZxyz(9.6238, 5.5350, 35.2045)
Luminance0.0554 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402CA3 #8FA32C
analogous
#2C53A3 #402CA3 #7B2CA3
triadic
#402CA3 #A3402C #2CA340
tetradic
#402CA3 #A32C53 #8FA32C #2CA37B
square
#402CA3 #A32C53 #8FA32C #2CA37B
split-complementary
#402CA3 #A37B2C #53A32C
monochromatic
#1A1243 #2D1F73 #402CA3 #5841CC #8271D9

Accessibility & contrast

On white

9.97
#402CA3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.11
#402CA3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402CA3
9.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402CA3#FFFFFF#000000##FFFFFF
##402CA31.009.972.119.97
#FFFFFF9.971.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A7
Deuteranopia (green-blind)
#003EA1
Tritanopia (blue-blind)
#004D65
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402ca3;
/* rgb */ color: rgb(64, 44, 163);
/* oklch */ color: oklch(40.0% 0.180 282.2);
Tailwind
colors: {
  custom: {
    50: '#8167bf',
    500: '#402ca3',
    950: '#000000',
  },
}
SCSS
$custom: #402ca3;
$custom-light: #8167bf;
$custom-dark: #000000;
JSON
{
  "hex": "#402ca3",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 163
  },
  "hsl": {
    "h": 250.084,
    "s": 57.488,
    "l": 40.588
  },
  "oklch": {
    "l": 0.39964,
    "c": 0.18004,
    "h": 282.2
  },
  "luminance": 0.05536
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402CA3

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

Preview Lab → · Contrast checker → · Palette generator →

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