#402164#402164

#402164 is a dark, moderate violet. Relative luminance 0.031; OKLCH L 32.7% C 0.114 H 301.7°. Best body text is #FFFFFF at 12.97:1 contrast (WCAG AA passes).

Color values

HEX#402164
RGBrgb(64, 33, 100)
HSLhsl(268, 50%, 26%)
HSVhsv(268, 67%, 39%)
CMYKcmyk(36%, 67%, 0%, 60.8%)
CIE-LABlab(20.43, 29.79, -34.11)
CIE-LCHlch(20.43, 45.28, 311.13°)
OKLaboklab(32.69% 0.0598 -0.0968)
OKLCHoklch(32.69% 0.114 301.7)
XYZxyz(4.9579, 3.0978, 12.3909)
Luminance0.0310 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402164 #456421
analogous
#212364 #402164 #612164
triadic
#402164 #644021 #216440
tetradic
#402164 #642123 #456421 #216461
square
#402164 #642123 #456421 #216461
split-complementary
#402164 #646121 #236421
monochromatic
#0F0817 #231236 #402164 #5D3092 #7B40C0

Accessibility & contrast

On white

12.97
#402164 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#402164 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402164
12.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402164#FFFFFF#000000##FFFFFF
##4021641.0012.971.6212.97
#FFFFFF12.971.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003166
Deuteranopia (green-blind)
#093163
Tritanopia (blue-blind)
#392F3F
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #402164;
/* rgb */ color: rgb(64, 33, 100);
/* oklch */ color: oklch(32.7% 0.114 301.7);
Tailwind
colors: {
  custom: {
    50: '#785e91',
    500: '#402164',
    950: '#000000',
  },
}
SCSS
$custom: #402164;
$custom-light: #785e91;
$custom-dark: #000000;
JSON
{
  "hex": "#402164",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 100
  },
  "hsl": {
    "h": 267.761,
    "s": 50.376,
    "l": 26.078
  },
  "oklch": {
    "l": 0.32693,
    "c": 0.11379,
    "h": 301.7
  },
  "luminance": 0.03098
}

Semantic roles & 50–950 ramp

primary
#402164
secondary
#739849
accent
#DA4E99
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09040D
muted
#7B797D

Preview Lab

Preview with #402164

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

Preview Lab → · Contrast checker → · Palette generator →

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