#402C8A#402C8A

#402C8A is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.6% C 0.148 H 286.7°. Best body text is #FFFFFF at 10.80:1 contrast (WCAG AA passes).

Color values

HEX#402C8A
RGBrgb(64, 44, 138)
HSLhsl(253, 52%, 36%)
HSVhsv(253, 68%, 54%)
CMYKcmyk(53.6%, 68.1%, 0%, 45.9%)
CIE-LABlab(25.94, 34.65, -49.42)
CIE-LCHlch(25.94, 60.36, 305.03°)
OKLaboklab(37.64% 0.0426 -0.1419)
OKLCHoklch(37.64% 0.148 286.7)
XYZxyz(7.6011, 4.7259, 24.5515)
Luminance0.0473 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402C8A #768A2C
analogous
#2C478A #402C8A #6F2C8A
triadic
#402C8A #8A402C #2C8A40
tetradic
#402C8A #8A2C47 #768A2C #2C8A6F
square
#402C8A #8A2C47 #768A2C #2C8A6F
split-complementary
#402C8A #8A6F2C #478A2C
monochromatic
#150E2D #2A1D5C #402C8A #563BB8 #7A63CD

Accessibility & contrast

On white

10.80
#402C8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#402C8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402C8A
10.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402C8A#FFFFFF#000000##FFFFFF
##402C8A1.0010.801.9510.80
#FFFFFF10.801.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00408D
Deuteranopia (green-blind)
#003B88
Tritanopia (blue-blind)
#234357
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #402c8a;
/* rgb */ color: rgb(64, 44, 138);
/* oklch */ color: oklch(37.6% 0.148 286.7);
Tailwind
colors: {
  custom: {
    50: '#7c66ad',
    500: '#402c8a',
    950: '#000000',
  },
}
SCSS
$custom: #402c8a;
$custom-light: #7c66ad;
$custom-dark: #000000;
JSON
{
  "hex": "#402c8a",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 138
  },
  "hsl": {
    "h": 252.766,
    "s": 51.648,
    "l": 35.686
  },
  "oklch": {
    "l": 0.37643,
    "c": 0.14813,
    "h": 286.7
  },
  "luminance": 0.04726
}

Semantic roles & 50–950 ramp

primary
#402C8A
secondary
#A1B45E
accent
#DB4DBD
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402C8A

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

Preview Lab → · Contrast checker → · Palette generator →

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