#402F90#402F90

#402F90 is a dark, vivid violet. Relative luminance 0.051; OKLCH L 38.7% C 0.152 H 284.8°. Best body text is #FFFFFF at 10.36:1 contrast (WCAG AA passes).

Color values

HEX#402F90
RGBrgb(64, 47, 144)
HSLhsl(251, 51%, 37%)
HSVhsv(251, 67%, 56%)
CMYKcmyk(55.6%, 67.4%, 0%, 43.5%)
CIE-LABlab(27.12, 34.75, -51.22)
CIE-LCHlch(27.12, 61.89, 304.15°)
OKLaboklab(38.66% 0.0388 -0.1471)
OKLCHoklch(38.66% 0.152 284.8)
XYZxyz(8.1634, 5.1362, 26.9414)
Luminance0.0514 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402F90 #7F902F
analogous
#2F4F90 #402F90 #702F90
triadic
#402F90 #90402F #2F9040
tetradic
#402F90 #902F4F #7F902F #2F9070
square
#402F90 #902F4F #7F902F #2F9070
split-complementary
#402F90 #90702F #4F902F
monochromatic
#171134 #2B2062 #402F90 #553EBE #7C6BCF

Accessibility & contrast

On white

10.36
#402F90 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402F90
10.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402F90#FFFFFF#000000##FFFFFF
##402F901.0010.362.0310.36
#FFFFFF10.361.0021.001.00
#0000002.0321.001.0021.00
##FFFFFF10.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004393
Deuteranopia (green-blind)
#003D8E
Tritanopia (blue-blind)
#1D475B
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #402f90;
/* rgb */ color: rgb(64, 47, 144);
/* oklch */ color: oklch(38.7% 0.152 284.8);
Tailwind
colors: {
  custom: {
    50: '#7d69b1',
    500: '#402f90',
    950: '#000000',
  },
}
SCSS
$custom: #402f90;
$custom-light: #7d69b1;
$custom-dark: #000000;
JSON
{
  "hex": "#402f90",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 144
  },
  "hsl": {
    "h": 250.515,
    "s": 50.785,
    "l": 37.451
  },
  "oklch": {
    "l": 0.38655,
    "c": 0.15217,
    "h": 284.8
  },
  "luminance": 0.05137
}

Semantic roles & 50–950 ramp

primary
#402F90
secondary
#A8B665
accent
#DA4EC2
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0A0611
muted
#7C7A80

Preview Lab

Preview with #402F90

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

Preview Lab → · Contrast checker → · Palette generator →

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