#402160#402160

#402160 is a dark, moderate violet. Relative luminance 0.030; OKLCH L 32.4% C 0.109 H 303.5°. Best body text is #FFFFFF at 13.09:1 contrast (WCAG AA passes).

Color values

HEX#402160
RGBrgb(64, 33, 96)
HSLhsl(270, 49%, 25%)
HSVhsv(270, 66%, 38%)
CMYKcmyk(33.3%, 65.6%, 0%, 62.4%)
CIE-LABlab(20.13, 28.67, -31.96)
CIE-LCHlch(20.13, 42.93, 311.90°)
OKLaboklab(32.38% 0.06 -0.0905)
OKLCHoklch(32.38% 0.109 303.5)
XYZxyz(4.7691, 3.0222, 11.3962)
Luminance0.0302 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402160 #416021
analogous
#212160 #402160 #5F2160
triadic
#402160 #604021 #216040
tetradic
#402160 #602121 #416021 #21605F
square
#402160 #602121 #416021 #21605F
split-complementary
#402160 #605F21 #216021
monochromatic
#0F0817 #221132 #402160 #5E318E #7D40BB

Accessibility & contrast

On white

13.09
#402160 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#402160 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402160
13.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402160#FFFFFF#000000##FFFFFF
##4021601.0013.091.6013.09
#FFFFFF13.091.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003062
Deuteranopia (green-blind)
#10315F
Tritanopia (blue-blind)
#3A2E3D
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #402160;
/* rgb */ color: rgb(64, 33, 96);
/* oklch */ color: oklch(32.4% 0.109 303.5);
Tailwind
colors: {
  custom: {
    50: '#785e8e',
    500: '#402160',
    950: '#000000',
  },
}
SCSS
$custom: #402160;
$custom-light: #785e8e;
$custom-dark: #000000;
JSON
{
  "hex": "#402160",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 96
  },
  "hsl": {
    "h": 269.524,
    "s": 48.837,
    "l": 25.294
  },
  "oklch": {
    "l": 0.32381,
    "c": 0.1086,
    "h": 303.5
  },
  "luminance": 0.03022
}

Semantic roles & 50–950 ramp

primary
#402160
secondary
#6F9449
accent
#D84F95
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09040C
muted
#7B797D

Preview Lab

Preview with #402160

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

Preview Lab → · Contrast checker → · Palette generator →

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