#402BA3#402BA3

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

Color values

HEX#402BA3
RGBrgb(64, 43, 163)
HSLhsl(251, 58%, 40%)
HSVhsv(251, 74%, 64%)
CMYKcmyk(60.7%, 73.6%, 0%, 36.1%)
CIE-LABlab(28.01, 43.05, -61.37)
CIE-LCHlch(28.01, 74.96, 305.04°)
OKLaboklab(39.82% 0.0389 -0.1769)
OKLCHoklch(39.82% 0.181 282.4)
XYZxyz(9.5870, 5.4614, 35.1922)
Luminance0.0546 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402BA3 #8EA32B
analogous
#2B52A3 #402BA3 #7C2BA3
triadic
#402BA3 #A3402B #2BA340
tetradic
#402BA3 #A32B52 #8EA32B #2BA37C
square
#402BA3 #A32B52 #8EA32B #2BA37C
split-complementary
#402BA3 #A37C2B #52A32B
monochromatic
#1A1142 #2D1E73 #402BA3 #583FCC #826FD9

Accessibility & contrast

On white

10.04
#402BA3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402BA3
10.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402BA3#FFFFFF#000000##FFFFFF
##402BA31.0010.042.0910.04
#FFFFFF10.041.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.041.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402ba3;
/* rgb */ color: rgb(64, 43, 163);
/* oklch */ color: oklch(39.8% 0.181 282.4);
Tailwind
colors: {
  custom: {
    50: '#8167bf',
    500: '#402ba3',
    950: '#000000',
  },
}
SCSS
$custom: #402ba3;
$custom-light: #8167bf;
$custom-dark: #000000;
JSON
{
  "hex": "#402ba3",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 163
  },
  "hsl": {
    "h": 250.5,
    "s": 58.252,
    "l": 40.392
  },
  "oklch": {
    "l": 0.39824,
    "c": 0.18112,
    "h": 282.4
  },
  "luminance": 0.05462
}

Semantic roles & 50–950 ramp

primary
#402BA3
secondary
#B1C06A
accent
#E146C6
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402BA3

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

Preview Lab → · Contrast checker → · Palette generator →

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