#402E93#402E93

#402E93 is a dark, vivid violet. Relative luminance 0.052; OKLCH L 38.8% C 0.157 H 284.5°. Best body text is #FFFFFF at 10.34:1 contrast (WCAG AA passes).

Color values

HEX#402E93
RGBrgb(64, 46, 147)
HSLhsl(251, 52%, 38%)
HSVhsv(251, 69%, 58%)
CMYKcmyk(56.5%, 68.7%, 0%, 42.4%)
CIE-LABlab(27.16, 36.30, -53.00)
CIE-LCHlch(27.16, 64.24, 304.41°)
OKLaboklab(38.76% 0.0394 -0.1524)
OKLCHoklch(38.76% 0.157 284.5)
XYZxyz(8.3562, 5.1501, 28.1519)
Luminance0.0515 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E93 #81932E
analogous
#2E4E93 #402E93 #722E93
triadic
#402E93 #93402E #2E9340
tetradic
#402E93 #932E4E #81932E #2E9372
square
#402E93 #932E4E #81932E #2E9372
split-complementary
#402E93 #93722E #4E932E
monochromatic
#171136 #2C1F64 #402E93 #543DC2 #7D6BD1

Accessibility & contrast

On white

10.34
#402E93 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.03
#402E93 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E93
10.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E93#FFFFFF#000000##FFFFFF
##402E931.0010.342.0310.34
#FFFFFF10.341.0021.001.00
#0000002.0321.001.0021.00
##FFFFFF10.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004396
Deuteranopia (green-blind)
#003D91
Tritanopia (blue-blind)
#1A485C
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #402e93;
/* rgb */ color: rgb(64, 46, 147);
/* oklch */ color: oklch(38.8% 0.157 284.5);
Tailwind
colors: {
  custom: {
    50: '#7e68b4',
    500: '#402e93',
    950: '#000000',
  },
}
SCSS
$custom: #402e93;
$custom-light: #7e68b4;
$custom-dark: #000000;
JSON
{
  "hex": "#402e93",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 147
  },
  "hsl": {
    "h": 250.693,
    "s": 52.332,
    "l": 37.843
  },
  "oklch": {
    "l": 0.38764,
    "c": 0.15738,
    "h": 284.5
  },
  "luminance": 0.05151
}

Semantic roles & 50–950 ramp

primary
#402E93
secondary
#A9B865
accent
#DC4CC2
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402E93

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

Preview Lab → · Contrast checker → · Palette generator →

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