#401252#401252

#401252 is a dark, moderate purple. Relative luminance 0.021; OKLCH L 29.2% C 0.115 H 314.6°. Best body text is #FFFFFF at 14.72:1 contrast (WCAG AA passes).

Color values

HEX#401252
RGBrgb(64, 18, 82)
HSLhsl(283, 64%, 20%)
HSVhsv(283, 78%, 32%)
CMYKcmyk(22%, 78%, 0%, 67.8%)
CIE-LABlab(16.16, 33.13, -28.97)
CIE-LCHlch(16.16, 44.00, 318.83°)
OKLaboklab(29.19% 0.0806 -0.0816)
OKLCHoklch(29.19% 0.115 314.6)
XYZxyz(3.8534, 2.1319, 8.1895)
Luminance0.0213 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401252 #245212
analogous
#201252 #401252 #521244
triadic
#401252 #524012 #125240
tetradic
#401252 #522012 #245212 #124452
square
#401252 #522012 #245212 #124452
split-complementary
#401252 #445212 #125220
monochromatic
#140619 #190720 #401252 #671D84 #8E28B6

Accessibility & contrast

On white

14.72
#401252 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#401252 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401252
14.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401252#FFFFFF#000000##FFFFFF
##4012521.0014.721.4314.72
#FFFFFF14.721.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002654
Deuteranopia (green-blind)
#0F2951
Tritanopia (blue-blind)
#3E1F30
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #401252;
/* rgb */ color: rgb(64, 18, 82);
/* oklch */ color: oklch(29.2% 0.115 314.6);
Tailwind
colors: {
  custom: {
    50: '#785583',
    500: '#401252',
    950: '#000000',
  },
}
SCSS
$custom: #401252;
$custom-light: #785583;
$custom-dark: #000000;
JSON
{
  "hex": "#401252",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 82
  },
  "hsl": {
    "h": 283.125,
    "s": 64,
    "l": 19.608
  },
  "oklch": {
    "l": 0.29192,
    "c": 0.11472,
    "h": 314.6
  },
  "luminance": 0.02132
}

Semantic roles & 50–950 ramp

primary
#401252
secondary
#4D8B35
accent
#E74170
background
#F7F5F8
surface
#EDE9EF
border
#C8C5CA
text
#09030A
muted
#7B787C

Preview Lab

Preview with #401252

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

Preview Lab → · Contrast checker → · Palette generator →

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