#4020B4#4020B4

#4020B4 is a dark, highly saturated violet. Relative luminance 0.054; OKLCH L 40.3% C 0.211 H 281.1°. Best body text is #FFFFFF at 10.08:1 contrast (WCAG AA passes).

Color values

HEX#4020B4
RGBrgb(64, 32, 180)
HSLhsl(253, 70%, 42%)
HSVhsv(253, 82%, 71%)
CMYKcmyk(64.4%, 82.2%, 0%, 29.4%)
CIE-LABlab(27.89, 53.48, -71.79)
CIE-LCHlch(27.89, 89.52, 306.69°)
OKLaboklab(40.27% 0.0408 -0.2072)
OKLCHoklch(40.27% 0.211 281.1)
XYZxyz(10.8665, 5.4175, 43.6442)
Luminance0.0542 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4020B4 #94B420
analogous
#204AB4 #4020B4 #8A20B4
triadic
#4020B4 #B44020 #20B440
tetradic
#4020B4 #B4204A #94B420 #20B48A
square
#4020B4 #B4204A #94B420 #20B48A
split-complementary
#4020B4 #B48A20 #4AB420
monochromatic
#1B0E4C #2E1780 #4020B4 #5A36DB #846AE4

Accessibility & contrast

On white

10.08
#4020B4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#4020B4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4020B4
10.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4020B4#FFFFFF#000000##FFFFFF
##4020B41.0010.082.0810.08
#FFFFFF10.081.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047B8
Deuteranopia (green-blind)
#003CB1
Tritanopia (blue-blind)
#004E6C
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #4020b4;
/* rgb */ color: rgb(64, 32, 180);
/* oklch */ color: oklch(40.3% 0.211 281.1);
Tailwind
colors: {
  custom: {
    50: '#8562cc',
    500: '#4020b4',
    950: '#000000',
  },
}
SCSS
$custom: #4020b4;
$custom-light: #8562cc;
$custom-dark: #000000;
JSON
{
  "hex": "#4020b4",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 180
  },
  "hsl": {
    "h": 252.973,
    "s": 69.811,
    "l": 41.569
  },
  "oklch": {
    "l": 0.40265,
    "c": 0.21114,
    "h": 281.1
  },
  "luminance": 0.05418
}

Semantic roles & 50–950 ramp

primary
#4020B4
secondary
#B4CA66
accent
#ED3BC6
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0D0514
muted
#7D7A82

Preview Lab

Preview with #4020B4

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

Preview Lab → · Contrast checker → · Palette generator →

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