#402F85#402F85

#402F85 is a dark, vivid violet. Relative luminance 0.048; OKLCH L 37.7% C 0.137 H 286.9°. Best body text is #FFFFFF at 10.70:1 contrast (WCAG AA passes).

Color values

HEX#402F85
RGBrgb(64, 47, 133)
HSLhsl(252, 48%, 35%)
HSVhsv(252, 65%, 52%)
CMYKcmyk(51.9%, 64.7%, 0%, 47.8%)
CIE-LABlab(26.20, 31.23, -45.87)
CIE-LCHlch(26.20, 55.50, 304.25°)
OKLaboklab(37.71% 0.04 -0.1314)
OKLCHoklch(37.71% 0.137 286.9)
XYZxyz(7.3633, 4.8161, 22.7274)
Luminance0.0482 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402F85 #74852F
analogous
#2F4985 #402F85 #6B2F85
triadic
#402F85 #85402F #2F8540
tetradic
#402F85 #852F49 #74852F #2F856B
square
#402F85 #852F49 #74852F #2F856B
split-complementary
#402F85 #856B2F #49852F
monochromatic
#140F2B #2A1F58 #402F85 #563FB2 #7966C9

Accessibility & contrast

On white

10.70
#402F85 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#402F85 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402F85
10.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402F85#FFFFFF#000000##FFFFFF
##402F851.0010.701.9610.70
#FFFFFF10.701.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004088
Deuteranopia (green-blind)
#003C83
Tritanopia (blue-blind)
#274455
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402f85;
/* rgb */ color: rgb(64, 47, 133);
/* oklch */ color: oklch(37.7% 0.137 286.9);
Tailwind
colors: {
  custom: {
    50: '#7b68a9',
    500: '#402f85',
    950: '#000000',
  },
}
SCSS
$custom: #402f85;
$custom-light: #7b68a9;
$custom-dark: #000000;
JSON
{
  "hex": "#402f85",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 133
  },
  "hsl": {
    "h": 251.86,
    "s": 47.778,
    "l": 35.294
  },
  "oklch": {
    "l": 0.37705,
    "c": 0.13739,
    "h": 286.9
  },
  "luminance": 0.04816
}

Semantic roles & 50–950 ramp

primary
#402F85
secondary
#A0B060
accent
#D750BD
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402F85

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

Preview Lab → · Contrast checker → · Palette generator →

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