#402BA5#402BA5

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

Color values

HEX#402BA5
RGBrgb(64, 43, 165)
HSLhsl(250, 59%, 41%)
HSVhsv(250, 74%, 65%)
CMYKcmyk(61.2%, 73.9%, 0%, 35.3%)
CIE-LABlab(28.20, 43.66, -62.27)
CIE-LCHlch(28.20, 76.05, 305.04°)
OKLaboklab(40.02% 0.0384 -0.1795)
OKLCHoklch(40.02% 0.184 282.1)
XYZxyz(9.7676, 5.5337, 36.1434)
Luminance0.0553 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402BA5 #90A52B
analogous
#2B53A5 #402BA5 #7D2BA5
triadic
#402BA5 #A5402B #2BA540
tetradic
#402BA5 #A52B53 #90A52B #2BA57D
square
#402BA5 #A52B53 #90A52B #2BA57D
split-complementary
#402BA5 #A57D2B #53A52B
monochromatic
#1A1244 #2D1E74 #402BA5 #5840CD #8371DA

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##402BA5#FFFFFF#000000##FFFFFF
##402BA51.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)
#0047A9
Deuteranopia (green-blind)
#003EA3
Tritanopia (blue-blind)
#004D65
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402ba5;
/* rgb */ color: rgb(64, 43, 165);
/* oklch */ color: oklch(40.0% 0.184 282.1);
Tailwind
colors: {
  custom: {
    50: '#8167c1',
    500: '#402ba5',
    950: '#000000',
  },
}
SCSS
$custom: #402ba5;
$custom-light: #8167c1;
$custom-dark: #000000;
JSON
{
  "hex": "#402ba5",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 165
  },
  "hsl": {
    "h": 250.328,
    "s": 58.654,
    "l": 40.784
  },
  "oklch": {
    "l": 0.40019,
    "c": 0.18358,
    "h": 282.1
  },
  "luminance": 0.05534
}

Semantic roles & 50–950 ramp

primary
#402BA5
secondary
#B2C16B
accent
#E246C7
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #402BA5

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

Preview Lab → · Contrast checker → · Palette generator →

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