#402173#402173

#402173 is a dark, vivid violet. Relative luminance 0.034; OKLCH L 33.9% C 0.133 H 295.8°. Best body text is #FFFFFF at 12.48:1 contrast (WCAG AA passes).

Color values

HEX#402173
RGBrgb(64, 33, 115)
HSLhsl(263, 55%, 29%)
HSVhsv(263, 71%, 45%)
CMYKcmyk(44.3%, 71.3%, 0%, 54.9%)
CIE-LABlab(21.64, 34.08, -41.89)
CIE-LCHlch(21.64, 54.00, 309.13°)
OKLaboklab(33.94% 0.0579 -0.1197)
OKLCHoklch(33.94% 0.133 295.8)
XYZxyz(5.7519, 3.4154, 16.5725)
Luminance0.0342 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402173 #547321
analogous
#212B73 #402173 #692173
triadic
#402173 #734021 #217340
tetradic
#402173 #73212B #547321 #217369
square
#402173 #73212B #547321 #217369
split-complementary
#402173 #736921 #2B7321
monochromatic
#0D0718 #261343 #402173 #5A2FA3 #7745CA

Accessibility & contrast

On white

12.48
#402173 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#402173 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402173
12.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402173#FFFFFF#000000##FFFFFF
##4021731.0012.481.6812.48
#FFFFFF12.481.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003475
Deuteranopia (green-blind)
#003371
Tritanopia (blue-blind)
#333547
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #402173;
/* rgb */ color: rgb(64, 33, 115);
/* oklch */ color: oklch(33.9% 0.133 295.8);
Tailwind
colors: {
  custom: {
    50: '#7a5f9c',
    500: '#402173',
    950: '#000000',
  },
}
SCSS
$custom: #402173;
$custom-light: #7a5f9c;
$custom-dark: #000000;
JSON
{
  "hex": "#402173",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 115
  },
  "hsl": {
    "h": 262.683,
    "s": 55.405,
    "l": 29.02
  },
  "oklch": {
    "l": 0.3394,
    "c": 0.13299,
    "h": 295.8
  },
  "luminance": 0.03416
}

Semantic roles & 50–950 ramp

primary
#402173
secondary
#83A649
accent
#DF49A6
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A050E
muted
#7C797E

Preview Lab

Preview with #402173

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

Preview Lab → · Contrast checker → · Palette generator →

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