#402281#402281

#402281 is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.3% C 0.149 H 291.3°. Best body text is #FFFFFF at 11.91:1 contrast (WCAG AA passes).

Color values

HEX#402281
RGBrgb(64, 34, 129)
HSLhsl(259, 58%, 32%)
HSVhsv(259, 74%, 51%)
CMYKcmyk(50.4%, 73.6%, 0%, 49.4%)
CIE-LABlab(23.06, 37.63, -48.48)
CIE-LCHlch(23.06, 61.37, 307.82°)
OKLaboklab(35.34% 0.0542 -0.1391)
OKLCHoklch(35.34% 0.149 291.3)
XYZxyz(6.6477, 3.8188, 21.1515)
Luminance0.0382 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402281 #638122
analogous
#223481 #402281 #702281
triadic
#402281 #814022 #228140
tetradic
#402281 #812234 #638122 #228170
square
#402281 #812234 #638122 #228170
split-complementary
#402281 #817022 #348122
monochromatic
#100820 #281551 #402281 #582FB1 #774DD0

Accessibility & contrast

On white

11.91
#402281 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#402281 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402281
11.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402281#FFFFFF#000000##FFFFFF
##4022811.0011.911.7611.91
#FFFFFF11.911.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003984
Deuteranopia (green-blind)
#00357F
Tritanopia (blue-blind)
#2B3B4F
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #402281;
/* rgb */ color: rgb(64, 34, 129);
/* oklch */ color: oklch(35.3% 0.149 291.3);
Tailwind
colors: {
  custom: {
    50: '#7c60a6',
    500: '#402281',
    950: '#000000',
  },
}
SCSS
$custom: #402281;
$custom-light: #7c60a6;
$custom-dark: #000000;
JSON
{
  "hex": "#402281",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 129
  },
  "hsl": {
    "h": 258.947,
    "s": 58.282,
    "l": 31.961
  },
  "oklch": {
    "l": 0.35339,
    "c": 0.14925,
    "h": 291.3
  },
  "luminance": 0.03819
}

Semantic roles & 50–950 ramp

primary
#402281
secondary
#93B34B
accent
#E146B0
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #402281

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

Preview Lab → · Contrast checker → · Palette generator →

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