#402282#402282

#402282 is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.4% C 0.150 H 291.0°. Best body text is #FFFFFF at 11.87:1 contrast (WCAG AA passes).

Color values

HEX#402282
RGBrgb(64, 34, 130)
HSLhsl(259, 59%, 32%)
HSVhsv(259, 74%, 51%)
CMYKcmyk(50.8%, 73.8%, 0%, 49%)
CIE-LABlab(23.15, 37.93, -48.96)
CIE-LCHlch(23.15, 61.93, 307.76°)
OKLaboklab(35.43% 0.0539 -0.1405)
OKLCHoklch(35.43% 0.15 291)
XYZxyz(6.7145, 3.8455, 21.5032)
Luminance0.0385 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402282 #648222
analogous
#223482 #402282 #702282
triadic
#402282 #824022 #228240
tetradic
#402282 #822234 #648222 #228270
square
#402282 #822234 #648222 #228270
split-complementary
#402282 #827022 #348222
monochromatic
#100921 #281551 #402282 #582FB3 #774ED1

Accessibility & contrast

On white

11.87
#402282 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.77
#402282 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402282
11.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402282#FFFFFF#000000##FFFFFF
##4022821.0011.871.7711.87
#FFFFFF11.871.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003985
Deuteranopia (green-blind)
#003580
Tritanopia (blue-blind)
#2A3B4F
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #402282;
/* rgb */ color: rgb(64, 34, 130);
/* oklch */ color: oklch(35.4% 0.150 291.0);
Tailwind
colors: {
  custom: {
    50: '#7c60a7',
    500: '#402282',
    950: '#000000',
  },
}
SCSS
$custom: #402282;
$custom-light: #7c60a7;
$custom-dark: #000000;
JSON
{
  "hex": "#402282",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 130
  },
  "hsl": {
    "h": 258.75,
    "s": 58.537,
    "l": 32.157
  },
  "oklch": {
    "l": 0.35432,
    "c": 0.15049,
    "h": 291
  },
  "luminance": 0.03846
}

Semantic roles & 50–950 ramp

primary
#402282
secondary
#93B44C
accent
#E246B1
background
#F7F5FA
surface
#EEEAF4
border
#C9C6CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402282

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

Preview Lab → · Contrast checker → · Palette generator →

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