#402976#402976

#402976 is a dark, vivid violet. Relative luminance 0.040; OKLCH L 35.4% C 0.126 H 292.6°. Best body text is #FFFFFF at 11.69:1 contrast (WCAG AA passes).

Color values

HEX#402976
RGBrgb(64, 41, 118)
HSLhsl(258, 48%, 31%)
HSVhsv(258, 65%, 46%)
CMYKcmyk(45.8%, 65.3%, 0%, 53.7%)
CIE-LABlab(23.62, 30.25, -40.60)
CIE-LCHlch(23.62, 50.63, 306.69°)
OKLaboklab(35.45% 0.0482 -0.1159)
OKLCHoklch(35.45% 0.126 292.6)
XYZxyz(6.1764, 3.9837, 17.5795)
Luminance0.0398 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402976 #5F7629
analogous
#293876 #402976 #662976
triadic
#402976 #764029 #297640
tetradic
#402976 #762938 #5F7629 #297666
square
#402976 #762938 #5F7629 #297666
split-complementary
#402976 #766629 #387629
monochromatic
#0F091B #271949 #402976 #5939A3 #7655C4

Accessibility & contrast

On white

11.69
#402976 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#402976 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402976
11.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402976#FFFFFF#000000##FFFFFF
##4029761.0011.691.8011.69
#FFFFFF11.691.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003978
Deuteranopia (green-blind)
#003774
Tritanopia (blue-blind)
#313B4B
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #402976;
/* rgb */ color: rgb(64, 41, 118);
/* oklch */ color: oklch(35.4% 0.126 292.6);
Tailwind
colors: {
  custom: {
    50: '#7a649e',
    500: '#402976',
    950: '#000000',
  },
}
SCSS
$custom: #402976;
$custom-light: #7a649e;
$custom-dark: #000000;
JSON
{
  "hex": "#402976",
  "rgb": {
    "r": 64,
    "g": 41,
    "b": 118
  },
  "hsl": {
    "h": 257.922,
    "s": 48.428,
    "l": 31.176
  },
  "oklch": {
    "l": 0.35447,
    "c": 0.12556,
    "h": 292.6
  },
  "luminance": 0.03984
}

Semantic roles & 50–950 ramp

primary
#402976
secondary
#8FA853
accent
#D850AF
background
#F7F6F9
surface
#EEEBF2
border
#C9C6CC
text
#09050E
muted
#7B7A7E

Preview Lab

Preview with #402976

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

Preview Lab → · Contrast checker → · Palette generator →

#402976 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva