#402F94#402F94

#402F94 is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.0% C 0.157 H 284.1°. Best body text is #FFFFFF at 10.23:1 contrast (WCAG AA passes).

Color values

HEX#402F94
RGBrgb(64, 47, 148)
HSLhsl(250, 52%, 38%)
HSVhsv(250, 68%, 58%)
CMYKcmyk(56.8%, 68.2%, 0%, 42%)
CIE-LABlab(27.46, 36.02, -53.12)
CIE-LCHlch(27.46, 64.18, 304.15°)
OKLaboklab(39.01% 0.0383 -0.1527)
OKLCHoklch(39.01% 0.157 284.1)
XYZxyz(8.4745, 5.2606, 28.5801)
Luminance0.0526 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402F94 #83942F
analogous
#2F5094 #402F94 #722F94
triadic
#402F94 #94402F #2F9440
tetradic
#402F94 #942F50 #83942F #2F9472
square
#402F94 #942F50 #83942F #2F9472
split-complementary
#402F94 #94722F #50942F
monochromatic
#181137 #2C2066 #402F94 #543EC2 #7E6DD1

Accessibility & contrast

On white

10.23
#402F94 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402F94
10.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402F94#FFFFFF#000000##FFFFFF
##402F941.0010.232.0510.23
#FFFFFF10.231.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004497
Deuteranopia (green-blind)
#003E92
Tritanopia (blue-blind)
#18495D
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #402f94;
/* rgb */ color: rgb(64, 47, 148);
/* oklch */ color: oklch(39.0% 0.157 284.1);
Tailwind
colors: {
  custom: {
    50: '#7e69b4',
    500: '#402f94',
    950: '#000000',
  },
}
SCSS
$custom: #402f94;
$custom-light: #7e69b4;
$custom-dark: #000000;
JSON
{
  "hex": "#402f94",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 148
  },
  "hsl": {
    "h": 250.099,
    "s": 51.795,
    "l": 38.235
  },
  "oklch": {
    "l": 0.39012,
    "c": 0.15744,
    "h": 284.1
  },
  "luminance": 0.05261
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402F94

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

Preview Lab → · Contrast checker → · Palette generator →

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