#402272#402272

#402272 is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.0% C 0.130 H 295.9°. Best body text is #FFFFFF at 12.43:1 contrast (WCAG AA passes).

Color values

HEX#402272
RGBrgb(64, 34, 114)
HSLhsl(263, 54%, 29%)
HSVhsv(263, 70%, 45%)
CMYKcmyk(43.9%, 70.2%, 0%, 55.3%)
CIE-LABlab(21.76, 33.22, -41.05)
CIE-LCHlch(21.76, 52.81, 308.98°)
OKLaboklab(34% 0.057 -0.1172)
OKLCHoklch(34% 0.13 295.9)
XYZxyz(5.7228, 3.4488, 16.2805)
Luminance0.0345 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402272 #547222
analogous
#222C72 #402272 #682272
triadic
#402272 #724022 #227240
tetradic
#402272 #72222C #547222 #227268
square
#402272 #72222C #547222 #227268
split-complementary
#402272 #726822 #2C7222
monochromatic
#0D0718 #261443 #402272 #5A30A1 #7746C8

Accessibility & contrast

On white

12.43
#402272 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#402272 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402272
12.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402272#FFFFFF#000000##FFFFFF
##4022721.0012.431.6912.43
#FFFFFF12.431.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003574
Deuteranopia (green-blind)
#003370
Tritanopia (blue-blind)
#333547
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #402272;
/* rgb */ color: rgb(64, 34, 114);
/* oklch */ color: oklch(34.0% 0.130 295.9);
Tailwind
colors: {
  custom: {
    50: '#7a5f9b',
    500: '#402272',
    950: '#000000',
  },
}
SCSS
$custom: #402272;
$custom-light: #7a5f9b;
$custom-dark: #000000;
JSON
{
  "hex": "#402272",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 114
  },
  "hsl": {
    "h": 262.5,
    "s": 54.054,
    "l": 29.02
  },
  "oklch": {
    "l": 0.34002,
    "c": 0.13035,
    "h": 295.9
  },
  "luminance": 0.03449
}

Semantic roles & 50–950 ramp

primary
#402272
secondary
#83A54B
accent
#DD4AA6
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A050E
muted
#7C797E

Preview Lab

Preview with #402272

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

Preview Lab → · Contrast checker → · Palette generator →

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