#402F93#402F93

#402F93 is a dark, vivid violet. Relative luminance 0.052; OKLCH L 38.9% C 0.156 H 284.2°. Best body text is #FFFFFF at 10.26:1 contrast (WCAG AA passes).

Color values

HEX#402F93
RGBrgb(64, 47, 147)
HSLhsl(250, 52%, 38%)
HSVhsv(250, 68%, 58%)
CMYKcmyk(56.5%, 68%, 0%, 42.4%)
CIE-LABlab(27.38, 35.70, -52.64)
CIE-LCHlch(27.38, 63.61, 304.15°)
OKLaboklab(38.92% 0.0384 -0.1513)
OKLCHoklch(38.92% 0.156 284.2)
XYZxyz(8.3957, 5.2291, 28.1650)
Luminance0.0523 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402F93 #82932F
analogous
#2F5093 #402F93 #722F93
triadic
#402F93 #93402F #2F9340
tetradic
#402F93 #932F50 #82932F #2F9372
square
#402F93 #932F50 #82932F #2F9372
split-complementary
#402F93 #93722F #50932F
monochromatic
#181136 #2C2065 #402F93 #543EC1 #7D6CD0

Accessibility & contrast

On white

10.26
#402F93 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#402F93 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402F93
10.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402F93#FFFFFF#000000##FFFFFF
##402F931.0010.262.0510.26
#FFFFFF10.261.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004496
Deuteranopia (green-blind)
#003D91
Tritanopia (blue-blind)
#1A485D
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #402f93;
/* rgb */ color: rgb(64, 47, 147);
/* oklch */ color: oklch(38.9% 0.156 284.2);
Tailwind
colors: {
  custom: {
    50: '#7e69b4',
    500: '#402f93',
    950: '#000000',
  },
}
SCSS
$custom: #402f93;
$custom-light: #7e69b4;
$custom-dark: #000000;
JSON
{
  "hex": "#402f93",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 147
  },
  "hsl": {
    "h": 250.2,
    "s": 51.546,
    "l": 38.039
  },
  "oklch": {
    "l": 0.38922,
    "c": 0.15613,
    "h": 284.2
  },
  "luminance": 0.0523
}

Semantic roles & 50–950 ramp

primary
#402F93
secondary
#AAB766
accent
#DB4DC3
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402F93

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

Preview Lab → · Contrast checker → · Palette generator →

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