#402155#402155

#402155 is a dark, moderate violet. Relative luminance 0.028; OKLCH L 31.6% C 0.094 H 309.6°. Best body text is #FFFFFF at 13.40:1 contrast (WCAG AA passes).

Color values

HEX#402155
RGBrgb(64, 33, 85)
HSLhsl(276, 44%, 23%)
HSVhsv(276, 61%, 33%)
CMYKcmyk(24.7%, 61.2%, 0%, 66.7%)
CIE-LABlab(19.37, 25.69, -25.87)
CIE-LCHlch(19.37, 36.46, 314.81°)
OKLaboklab(31.57% 0.06 -0.0727)
OKLCHoklch(31.57% 0.094 309.6)
XYZxyz(4.2976, 2.8337, 8.9131)
Luminance0.0283 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402155 #365521
analogous
#262155 #402155 #552150
triadic
#402155 #554021 #215540
tetradic
#402155 #552621 #365521 #215055
square
#402155 #552621 #365521 #215055
split-complementary
#402155 #505521 #215526
monochromatic
#110916 #1F1029 #402155 #613281 #8243AD

Accessibility & contrast

On white

13.40
#402155 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#402155 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402155
13.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402155#FFFFFF#000000##FFFFFF
##4021551.0013.401.5713.40
#FFFFFF13.401.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#102E57
Deuteranopia (green-blind)
#1B2F54
Tritanopia (blue-blind)
#3D2A37
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #402155;
/* rgb */ color: rgb(64, 33, 85);
/* oklch */ color: oklch(31.6% 0.094 309.6);
Tailwind
colors: {
  custom: {
    50: '#775e85',
    500: '#402155',
    950: '#000000',
  },
}
SCSS
$custom: #402155;
$custom-light: #775e85;
$custom-dark: #000000;
JSON
{
  "hex": "#402155",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 85
  },
  "hsl": {
    "h": 275.769,
    "s": 44.068,
    "l": 23.137
  },
  "oklch": {
    "l": 0.31574,
    "c": 0.09424,
    "h": 309.6
  },
  "luminance": 0.02834
}

Semantic roles & 50–950 ramp

primary
#402155
secondary
#638949
accent
#D45488
background
#F7F5F8
surface
#EDE9EF
border
#C8C5CA
text
#09040B
muted
#7B797C

Preview Lab

Preview with #402155

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

Preview Lab → · Contrast checker → · Palette generator →

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