#4020A7#4020A7

#4020A7 is a dark, vivid violet. Relative luminance 0.049; OKLCH L 38.9% C 0.196 H 283.3°. Best body text is #FFFFFF at 10.59:1 contrast (WCAG AA passes).

Color values

HEX#4020A7
RGBrgb(64, 32, 167)
HSLhsl(254, 68%, 39%)
HSVhsv(254, 81%, 65%)
CMYKcmyk(61.7%, 80.8%, 0%, 34.5%)
CIE-LABlab(26.48, 49.76, -66.31)
CIE-LCHlch(26.48, 82.91, 306.89°)
OKLaboklab(38.88% 0.045 -0.1912)
OKLCHoklch(38.88% 0.196 283.3)
XYZxyz(9.6038, 4.9124, 36.9938)
Luminance0.0491 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4020A7 #87A720
analogous
#2044A7 #4020A7 #8420A7
triadic
#4020A7 #A74020 #20A740
tetradic
#4020A7 #A72044 #87A720 #20A784
square
#4020A7 #A72044 #87A720 #20A784
split-complementary
#4020A7 #A78420 #44A720
monochromatic
#190C40 #2C1674 #4020A7 #562DD7 #7F61E1

Accessibility & contrast

On white

10.59
#4020A7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.98
#4020A7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4020A7
10.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4020A7#FFFFFF#000000##FFFFFF
##4020A71.0010.591.9810.59
#FFFFFF10.591.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0043AB
Deuteranopia (green-blind)
#003AA5
Tritanopia (blue-blind)
#004964
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #4020a7;
/* rgb */ color: rgb(64, 32, 167);
/* oklch */ color: oklch(38.9% 0.196 283.3);
Tailwind
colors: {
  custom: {
    50: '#8261c2',
    500: '#4020a7',
    950: '#000000',
  },
}
SCSS
$custom: #4020a7;
$custom-light: #8261c2;
$custom-dark: #000000;
JSON
{
  "hex": "#4020a7",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 167
  },
  "hsl": {
    "h": 254.222,
    "s": 67.839,
    "l": 39.02
  },
  "oklch": {
    "l": 0.38875,
    "c": 0.19644,
    "h": 283.3
  },
  "luminance": 0.04913
}

Semantic roles & 50–950 ramp

primary
#4020A7
secondary
#ADC55D
accent
#EB3DC2
background
#F8F5FC
surface
#F0EAF8
border
#CBC6D1
text
#0C0513
muted
#7D7982

Preview Lab

Preview with #4020A7

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

Preview Lab → · Contrast checker → · Palette generator →

#4020A7 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva