#4020A6#4020A6

#4020A6 is a dark, vivid violet. Relative luminance 0.049; OKLCH L 38.8% C 0.195 H 283.4°. Best body text is #FFFFFF at 10.63:1 contrast (WCAG AA passes).

Color values

HEX#4020A6
RGBrgb(64, 32, 166)
HSLhsl(254, 68%, 39%)
HSVhsv(254, 81%, 65%)
CMYKcmyk(61.4%, 80.7%, 0%, 34.9%)
CIE-LABlab(26.38, 49.48, -65.88)
CIE-LCHlch(26.38, 82.39, 306.91°)
OKLaboklab(38.77% 0.0454 -0.19)
OKLCHoklch(38.77% 0.195 283.4)
XYZxyz(9.5117, 4.8755, 36.5089)
Luminance0.0488 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4020A6 #86A620
analogous
#2043A6 #4020A6 #8320A6
triadic
#4020A6 #A64020 #20A640
tetradic
#4020A6 #A62043 #86A620 #20A683
square
#4020A6 #A62043 #86A620 #20A683
split-complementary
#4020A6 #A68320 #43A620
monochromatic
#180C3F #2C1673 #4020A6 #552DD6 #7F60E0

Accessibility & contrast

On white

10.63
#4020A6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #4020A6
10.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4020A6#FFFFFF#000000##FFFFFF
##4020A61.0010.631.9810.63
#FFFFFF10.631.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0042AA
Deuteranopia (green-blind)
#003AA4
Tritanopia (blue-blind)
#004864
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #4020a6;
/* rgb */ color: rgb(64, 32, 166);
/* oklch */ color: oklch(38.8% 0.195 283.4);
Tailwind
colors: {
  custom: {
    50: '#8261c2',
    500: '#4020a6',
    950: '#000000',
  },
}
SCSS
$custom: #4020a6;
$custom-light: #8261c2;
$custom-dark: #000000;
JSON
{
  "hex": "#4020a6",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 166
  },
  "hsl": {
    "h": 254.328,
    "s": 67.677,
    "l": 38.824
  },
  "oklch": {
    "l": 0.3877,
    "c": 0.1953,
    "h": 283.4
  },
  "luminance": 0.04876
}

Semantic roles & 50–950 ramp

primary
#4020A6
secondary
#ACC55D
accent
#EB3DC1
background
#F8F5FC
surface
#F0EAF8
border
#CBC6D1
text
#0C0513
muted
#7D7982

Preview Lab

Preview with #4020A6

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

Preview Lab → · Contrast checker → · Palette generator →

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