#402085#402085

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

Color values

HEX#402085
RGBrgb(64, 32, 133)
HSLhsl(259, 61%, 32%)
HSVhsv(259, 76%, 52%)
CMYKcmyk(51.9%, 75.9%, 0%, 47.8%)
CIE-LABlab(23.05, 39.87, -51.01)
CIE-LCHlch(23.05, 64.75, 308.01°)
OKLaboklab(35.45% 0.0551 -0.1465)
OKLCHoklch(35.45% 0.157 290.6)
XYZxyz(6.8633, 3.8162, 22.5607)
Luminance0.0382 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402085 #658520
analogous
#203285 #402085 #732085
triadic
#402085 #854020 #208540
tetradic
#402085 #852032 #658520 #208573
square
#402085 #852032 #658520 #208573
split-complementary
#402085 #857320 #328520
monochromatic
#110822 #281454 #402085 #582CB6 #774CD4

Accessibility & contrast

On white

11.91
#402085 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#402085 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402085
11.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402085#FFFFFF#000000##FFFFFF
##4020851.0011.911.7611.91
#FFFFFF11.911.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003988
Deuteranopia (green-blind)
#003583
Tritanopia (blue-blind)
#283B51
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #402085;
/* rgb */ color: rgb(64, 32, 133);
/* oklch */ color: oklch(35.4% 0.157 290.6);
Tailwind
colors: {
  custom: {
    50: '#7d5fa9',
    500: '#402085',
    950: '#000000',
  },
}
SCSS
$custom: #402085;
$custom-light: #7d5fa9;
$custom-dark: #000000;
JSON
{
  "hex": "#402085",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 133
  },
  "hsl": {
    "h": 259.01,
    "s": 61.212,
    "l": 32.353
  },
  "oklch": {
    "l": 0.35447,
    "c": 0.1565,
    "h": 290.6
  },
  "luminance": 0.03816
}

Semantic roles & 50–950 ramp

primary
#402085
secondary
#94B74A
accent
#E443B1
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402085

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

Preview Lab → · Contrast checker → · Palette generator →

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