#402452#402452

#402452 is a dark, moderate violet. Relative luminance 0.030; OKLCH L 31.9% C 0.085 H 310.6°. Best body text is #FFFFFF at 13.19:1 contrast (WCAG AA passes).

Color values

HEX#402452
RGBrgb(64, 36, 82)
HSLhsl(277, 39%, 23%)
HSVhsv(277, 56%, 32%)
CMYKcmyk(22%, 56.1%, 0%, 67.8%)
CIE-LABlab(19.89, 23.03, -23.02)
CIE-LCHlch(19.89, 32.56, 315.01°)
OKLaboklab(31.9% 0.0551 -0.0644)
OKLCHoklch(31.9% 0.085 310.6)
XYZxyz(4.2679, 2.9610, 8.3277)
Luminance0.0296 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402452 #365224
analogous
#292452 #402452 #52244D
triadic
#402452 #524024 #245240
tetradic
#402452 #522924 #365224 #244D52
square
#402452 #522924 #365224 #244D52
split-complementary
#402452 #4D5224 #245229
monochromatic
#110915 #1F1127 #402452 #61377D #8249A7

Accessibility & contrast

On white

13.19
#402452 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#402452 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402452
13.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402452#FFFFFF#000000##FFFFFF
##4024521.0013.191.5913.19
#FFFFFF13.191.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#182F54
Deuteranopia (green-blind)
#203151
Tritanopia (blue-blind)
#3E2C37
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #402452;
/* rgb */ color: rgb(64, 36, 82);
/* oklch */ color: oklch(31.9% 0.085 310.6);
Tailwind
colors: {
  custom: {
    50: '#766083',
    500: '#402452',
    950: '#000000',
  },
}
SCSS
$custom: #402452;
$custom-light: #766083;
$custom-dark: #000000;
JSON
{
  "hex": "#402452",
  "rgb": {
    "r": 64,
    "g": 36,
    "b": 82
  },
  "hsl": {
    "h": 276.522,
    "s": 38.983,
    "l": 23.137
  },
  "oklch": {
    "l": 0.31897,
    "c": 0.08473,
    "h": 310.6
  },
  "luminance": 0.02961
}

Semantic roles & 50–950 ramp

primary
#402452
secondary
#63864C
accent
#CF5987
background
#F7F5F8
surface
#EDE9EF
border
#C8C5CA
text
#08050A
muted
#7B797C

Preview Lab

Preview with #402452

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

Preview Lab → · Contrast checker → · Palette generator →

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