#402F92#402F92

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

Color values

HEX#402F92
RGBrgb(64, 47, 146)
HSLhsl(250, 51%, 38%)
HSVhsv(250, 68%, 57%)
CMYKcmyk(56.2%, 67.8%, 0%, 42.7%)
CIE-LABlab(27.29, 35.38, -52.17)
CIE-LCHlch(27.29, 63.04, 304.15°)
OKLaboklab(38.83% 0.0386 -0.1499)
OKLCHoklch(38.83% 0.155 284.4)
XYZxyz(8.3176, 5.1979, 27.7536)
Luminance0.0520 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402F92 #81922F
analogous
#2F4F92 #402F92 #712F92
triadic
#402F92 #92402F #2F9240
tetradic
#402F92 #922F4F #81922F #2F9271
square
#402F92 #922F4F #81922F #2F9271
split-complementary
#402F92 #92712F #4F922F
monochromatic
#171135 #2C2064 #402F92 #543EC0 #7D6CD0

Accessibility & contrast

On white

10.30
#402F92 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.04
#402F92 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402F92
10.30:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402F92#FFFFFF#000000##FFFFFF
##402F921.0010.302.0410.30
#FFFFFF10.301.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.301.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004395
Deuteranopia (green-blind)
#003D90
Tritanopia (blue-blind)
#1B485C
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #402f92;
/* rgb */ color: rgb(64, 47, 146);
/* oklch */ color: oklch(38.8% 0.155 284.4);
Tailwind
colors: {
  custom: {
    50: '#7d69b3',
    500: '#402f92',
    950: '#000000',
  },
}
SCSS
$custom: #402f92;
$custom-light: #7d69b3;
$custom-dark: #000000;
JSON
{
  "hex": "#402f92",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 146
  },
  "hsl": {
    "h": 250.303,
    "s": 51.295,
    "l": 37.843
  },
  "oklch": {
    "l": 0.38833,
    "c": 0.15481,
    "h": 284.4
  },
  "luminance": 0.05198
}

Semantic roles & 50–950 ramp

primary
#402F92
secondary
#A9B766
accent
#DB4DC2
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402F92

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

Preview Lab → · Contrast checker → · Palette generator →

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