#402F95#402F95

#402F95 is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.1% C 0.159 H 283.9°. Best body text is #FFFFFF at 10.20:1 contrast (WCAG AA passes).

Color values

HEX#402F95
RGBrgb(64, 47, 149)
HSLhsl(250, 52%, 38%)
HSVhsv(250, 68%, 58%)
CMYKcmyk(57%, 68.5%, 0%, 41.6%)
CIE-LABlab(27.55, 36.34, -53.59)
CIE-LCHlch(27.55, 64.75, 304.15°)
OKLaboklab(39.1% 0.0381 -0.1541)
OKLCHoklch(39.1% 0.159 283.9)
XYZxyz(8.5540, 5.2924, 28.9987)
Luminance0.0529 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402F95 #84952F
analogous
#2F5195 #402F95 #732F95
triadic
#402F95 #95402F #2F9540
tetradic
#402F95 #952F51 #84952F #2F9573
square
#402F95 #952F51 #84952F #2F9573
split-complementary
#402F95 #95732F #51952F
monochromatic
#181238 #2C2066 #402F95 #553FC2 #7E6DD1

Accessibility & contrast

On white

10.20
#402F95 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.06
#402F95 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402F95
10.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402F95#FFFFFF#000000##FFFFFF
##402F951.0010.202.0610.20
#FFFFFF10.201.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004498
Deuteranopia (green-blind)
#003E93
Tritanopia (blue-blind)
#17495E
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #402f95;
/* rgb */ color: rgb(64, 47, 149);
/* oklch */ color: oklch(39.1% 0.159 283.9);
Tailwind
colors: {
  custom: {
    50: '#7e69b5',
    500: '#402f95',
    950: '#000000',
  },
}
SCSS
$custom: #402f95;
$custom-light: #7e69b5;
$custom-dark: #000000;
JSON
{
  "hex": "#402f95",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 149
  },
  "hsl": {
    "h": 250,
    "s": 52.041,
    "l": 38.431
  },
  "oklch": {
    "l": 0.39102,
    "c": 0.15875,
    "h": 283.9
  },
  "luminance": 0.05293
}

Semantic roles & 50–950 ramp

primary
#402F95
secondary
#ABB867
accent
#DB4CC4
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402F95

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

Preview Lab → · Contrast checker → · Palette generator →

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