#402285#402285

#402285 is a dark, vivid violet. Relative luminance 0.039; OKLCH L 35.7% C 0.154 H 290.2°. Best body text is #FFFFFF at 11.76:1 contrast (WCAG AA passes).

Color values

HEX#402285
RGBrgb(64, 34, 133)
HSLhsl(258, 59%, 33%)
HSVhsv(258, 74%, 52%)
CMYKcmyk(51.9%, 74.4%, 0%, 47.8%)
CIE-LABlab(23.43, 38.82, -50.40)
CIE-LCHlch(23.43, 63.61, 307.60°)
OKLaboklab(35.71% 0.0533 -0.1447)
OKLCHoklch(35.71% 0.154 290.2)
XYZxyz(6.9188, 3.9272, 22.5792)
Luminance0.0393 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402285 #678522
analogous
#223585 #402285 #712285
triadic
#402285 #854022 #228540
tetradic
#402285 #852235 #678522 #228571
square
#402285 #852235 #678522 #228571
split-complementary
#402285 #857122 #358522
monochromatic
#110924 #291654 #402285 #572EB6 #774FD2

Accessibility & contrast

On white

11.76
#402285 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.79
#402285 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402285
11.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402285#FFFFFF#000000##FFFFFF
##4022851.0011.761.7911.76
#FFFFFF11.761.0021.001.00
#0000001.7921.001.0021.00
##FFFFFF11.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A88
Deuteranopia (green-blind)
#003583
Tritanopia (blue-blind)
#283C51
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #402285;
/* rgb */ color: rgb(64, 34, 133);
/* oklch */ color: oklch(35.7% 0.154 290.2);
Tailwind
colors: {
  custom: {
    50: '#7c60a9',
    500: '#402285',
    950: '#000000',
  },
}
SCSS
$custom: #402285;
$custom-light: #7c60a9;
$custom-dark: #000000;
JSON
{
  "hex": "#402285",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 133
  },
  "hsl": {
    "h": 258.182,
    "s": 59.281,
    "l": 32.745
  },
  "oklch": {
    "l": 0.35712,
    "c": 0.15419,
    "h": 290.2
  },
  "luminance": 0.03927
}

Semantic roles & 50–950 ramp

primary
#402285
secondary
#96B64D
accent
#E245B3
background
#F8F5FA
surface
#EFEAF4
border
#CAC6CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402285

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

Preview Lab → · Contrast checker → · Palette generator →

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