#402F74#402F74

#402F74 is a dark, moderate violet. Relative luminance 0.044; OKLCH L 36.3% C 0.114 H 291.0°. Best body text is #FFFFFF at 11.19:1 contrast (WCAG AA passes).

Color values

HEX#402F74
RGBrgb(64, 47, 116)
HSLhsl(255, 42%, 32%)
HSVhsv(255, 59%, 45%)
CMYKcmyk(44.8%, 59.5%, 0%, 54.5%)
CIE-LABlab(24.90, 25.86, -37.25)
CIE-LCHlch(24.90, 45.35, 304.77°)
OKLaboklab(36.34% 0.0408 -0.1061)
OKLCHoklch(36.34% 0.114 291)
XYZxyz(6.2824, 4.3838, 17.0348)
Luminance0.0438 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402F74 #63742F
analogous
#2F4174 #402F74 #632F74
triadic
#402F74 #74402F #2F7440
tetradic
#402F74 #742F41 #63742F #2F7463
square
#402F74 #742F41 #63742F #2F7463
split-complementary
#402F74 #74632F #41742F
monochromatic
#100C1D #281D48 #402F74 #5841A0 #775FBE

Accessibility & contrast

On white

11.19
#402F74 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.88
#402F74 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402F74
11.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402F74#FFFFFF#000000##FFFFFF
##402F741.0011.191.8811.19
#FFFFFF11.191.0021.001.00
#0000001.8821.001.0021.00
##FFFFFF11.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#063C76
Deuteranopia (green-blind)
#0B3A72
Tritanopia (blue-blind)
#313E4C
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #402f74;
/* rgb */ color: rgb(64, 47, 116);
/* oklch */ color: oklch(36.3% 0.114 291.0);
Tailwind
colors: {
  custom: {
    50: '#79689c',
    500: '#402f74',
    950: '#000000',
  },
}
SCSS
$custom: #402f74;
$custom-light: #79689c;
$custom-dark: #000000;
JSON
{
  "hex": "#402f74",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 116
  },
  "hsl": {
    "h": 254.783,
    "s": 42.331,
    "l": 31.961
  },
  "oklch": {
    "l": 0.36339,
    "c": 0.11363,
    "h": 291
  },
  "luminance": 0.04384
}

Semantic roles & 50–950 ramp

primary
#402F74
secondary
#93A55A
accent
#D256B3
background
#F7F6F9
surface
#EEEBF2
border
#C9C6CC
text
#09060E
muted
#7B7A7E

Preview Lab

Preview with #402F74

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

Preview Lab → · Contrast checker → · Palette generator →

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