#402284#402284

#402284 is a dark, vivid violet. Relative luminance 0.039; OKLCH L 35.6% C 0.153 H 290.5°. Best body text is #FFFFFF at 11.80:1 contrast (WCAG AA passes).

Color values

HEX#402284
RGBrgb(64, 34, 132)
HSLhsl(258, 59%, 33%)
HSVhsv(258, 74%, 52%)
CMYKcmyk(51.5%, 74.2%, 0%, 48.2%)
CIE-LABlab(23.34, 38.52, -49.92)
CIE-LCHlch(23.34, 63.05, 307.65°)
OKLaboklab(35.62% 0.0535 -0.1433)
OKLCHoklch(35.62% 0.153 290.5)
XYZxyz(6.8500, 3.8997, 22.2171)
Luminance0.0390 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402284 #668422
analogous
#223584 #402284 #712284
triadic
#402284 #844022 #228440
tetradic
#402284 #842235 #668422 #228471
square
#402284 #842235 #668422 #228471
split-complementary
#402284 #847122 #358422
monochromatic
#110923 #281553 #402284 #582FB5 #774FD2

Accessibility & contrast

On white

11.80
#402284 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.78
#402284 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402284
11.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402284#FFFFFF#000000##FFFFFF
##4022841.0011.801.7811.80
#FFFFFF11.801.0021.001.00
#0000001.7821.001.0021.00
##FFFFFF11.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003987
Deuteranopia (green-blind)
#003582
Tritanopia (blue-blind)
#293C51
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #402284;
/* rgb */ color: rgb(64, 34, 132);
/* oklch */ color: oklch(35.6% 0.153 290.5);
Tailwind
colors: {
  custom: {
    50: '#7c60a9',
    500: '#402284',
    950: '#000000',
  },
}
SCSS
$custom: #402284;
$custom-light: #7c60a9;
$custom-dark: #000000;
JSON
{
  "hex": "#402284",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 132
  },
  "hsl": {
    "h": 258.367,
    "s": 59.036,
    "l": 32.549
  },
  "oklch": {
    "l": 0.35618,
    "c": 0.15295,
    "h": 290.5
  },
  "luminance": 0.039
}

Semantic roles & 50–950 ramp

primary
#402284
secondary
#95B54D
accent
#E246B2
background
#F7F5FA
surface
#EEEAF4
border
#C9C6CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402284

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

Preview Lab → · Contrast checker → · Palette generator →

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