#402D92#402D92

#402D92 is a dark, vivid violet. Relative luminance 0.050; OKLCH L 38.5% C 0.157 H 284.9°. Best body text is #FFFFFF at 10.46:1 contrast (WCAG AA passes).

Color values

HEX#402D92
RGBrgb(64, 45, 146)
HSLhsl(251, 53%, 37%)
HSVhsv(251, 69%, 57%)
CMYKcmyk(56.2%, 69.2%, 0%, 42.7%)
CIE-LABlab(26.85, 36.58, -52.88)
CIE-LCHlch(26.85, 64.30, 304.67°)
OKLaboklab(38.52% 0.0405 -0.152)
OKLCHoklch(38.52% 0.157 284.9)
XYZxyz(8.2395, 5.0416, 27.7275)
Luminance0.0504 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D92 #7F922D
analogous
#2D4D92 #402D92 #722D92
triadic
#402D92 #92402D #2D9240
tetradic
#402D92 #922D4D #7F922D #2D9272
square
#402D92 #922D4D #7F922D #2D9272
split-complementary
#402D92 #92722D #4D922D
monochromatic
#171034 #2B1F63 #402D92 #553BC1 #7C69D1

Accessibility & contrast

On white

10.46
#402D92 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.01
#402D92 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D92
10.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D92#FFFFFF#000000##FFFFFF
##402D921.0010.462.0110.46
#FFFFFF10.461.0021.001.00
#0000002.0121.001.0021.00
##FFFFFF10.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004295
Deuteranopia (green-blind)
#003C90
Tritanopia (blue-blind)
#1B475B
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #402d92;
/* rgb */ color: rgb(64, 45, 146);
/* oklch */ color: oklch(38.5% 0.157 284.9);
Tailwind
colors: {
  custom: {
    50: '#7e67b3',
    500: '#402d92',
    950: '#000000',
  },
}
SCSS
$custom: #402d92;
$custom-light: #7e67b3;
$custom-dark: #000000;
JSON
{
  "hex": "#402d92",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 146
  },
  "hsl": {
    "h": 251.287,
    "s": 52.88,
    "l": 37.451
  },
  "oklch": {
    "l": 0.38517,
    "c": 0.15732,
    "h": 284.9
  },
  "luminance": 0.05042
}

Semantic roles & 50–950 ramp

primary
#402D92
secondary
#A8B763
accent
#DC4CC1
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402D92

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

Preview Lab → · Contrast checker → · Palette generator →

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