#402242#402242

#402242 is a dark, moderate purple. Relative luminance 0.026; OKLCH L 30.6% C 0.068 H 324.8°. Best body text is #FFFFFF at 13.77:1 contrast (WCAG AA passes).

Color values

HEX#402242
RGBrgb(64, 34, 66)
HSLhsl(296, 32%, 20%)
HSVhsv(296, 48%, 26%)
CMYKcmyk(3%, 48.5%, 0%, 74.1%)
CIE-LABlab(18.49, 20.35, -14.33)
CIE-LCHlch(18.49, 24.88, 324.85°)
OKLaboklab(30.56% 0.0557 -0.0392)
OKLCHoklch(30.56% 0.068 324.8)
XYZxyz(3.6697, 2.6276, 5.4671)
Luminance0.0263 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402242 #244222
analogous
#302242 #402242 #422234
triadic
#402242 #424022 #224240
tetradic
#402242 #423022 #244222 #223442
square
#402242 #423022 #244222 #223442
split-complementary
#402242 #344222 #224230
monochromatic
#140A14 #190D1A #402242 #67376A #8E4C93

Accessibility & contrast

On white

13.77
#402242 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#402242 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402242
13.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402242#FFFFFF#000000##FFFFFF
##4022421.0013.771.5313.77
#FFFFFF13.771.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1F2B43
Deuteranopia (green-blind)
#272E41
Tritanopia (blue-blind)
#41252E
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #402242;
/* rgb */ color: rgb(64, 34, 66);
/* oklch */ color: oklch(30.6% 0.068 324.8);
Tailwind
colors: {
  custom: {
    50: '#765e76',
    500: '#402242',
    950: '#000000',
  },
}
SCSS
$custom: #402242;
$custom-light: #765e76;
$custom-dark: #000000;
JSON
{
  "hex": "#402242",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 66
  },
  "hsl": {
    "h": 296.25,
    "s": 32,
    "l": 19.608
  },
  "oklch": {
    "l": 0.30559,
    "c": 0.06811,
    "h": 324.8
  },
  "luminance": 0.02627
}

Semantic roles & 50–950 ramp

primary
#402242
secondary
#4D754A
accent
#C86066
background
#F7F5F7
surface
#EDE9ED
border
#C8C5C8
text
#080408
muted
#7B797B

Preview Lab

Preview with #402242

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

Preview Lab → · Contrast checker → · Palette generator →

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