#4020A5#4020A5

#4020A5 is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.7% C 0.194 H 283.6°. Best body text is #FFFFFF at 10.67:1 contrast (WCAG AA passes).

Color values

HEX#4020A5
RGBrgb(64, 32, 165)
HSLhsl(254, 68%, 39%)
HSVhsv(254, 81%, 65%)
CMYKcmyk(61.2%, 80.6%, 0%, 35.3%)
CIE-LABlab(26.27, 49.19, -65.45)
CIE-LCHlch(26.27, 81.87, 306.93°)
OKLaboklab(38.67% 0.0457 -0.1887)
OKLCHoklch(38.67% 0.194 283.6)
XYZxyz(9.4203, 4.8390, 36.0276)
Luminance0.0484 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4020A5 #85A520
analogous
#2042A5 #4020A5 #8220A5
triadic
#4020A5 #A54020 #20A540
tetradic
#4020A5 #A52042 #85A520 #20A582
square
#4020A5 #A52042 #85A520 #20A582
split-complementary
#4020A5 #A58220 #42A520
monochromatic
#180C3E #2C1672 #4020A5 #552CD6 #7E5FE0

Accessibility & contrast

On white

10.67
#4020A5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.97
#4020A5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4020A5
10.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4020A5#FFFFFF#000000##FFFFFF
##4020A51.0010.671.9710.67
#FFFFFF10.671.0021.001.00
#0000001.9721.001.0021.00
##FFFFFF10.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0042A9
Deuteranopia (green-blind)
#003AA3
Tritanopia (blue-blind)
#004863
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #4020a5;
/* rgb */ color: rgb(64, 32, 165);
/* oklch */ color: oklch(38.7% 0.194 283.6);
Tailwind
colors: {
  custom: {
    50: '#8261c1',
    500: '#4020a5',
    950: '#000000',
  },
}
SCSS
$custom: #4020a5;
$custom-light: #8261c1;
$custom-dark: #000000;
JSON
{
  "hex": "#4020a5",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 165
  },
  "hsl": {
    "h": 254.436,
    "s": 67.513,
    "l": 38.627
  },
  "oklch": {
    "l": 0.38665,
    "c": 0.19416,
    "h": 283.6
  },
  "luminance": 0.0484
}

Semantic roles & 50–950 ramp

primary
#4020A5
secondary
#ACC55C
accent
#EA3DC1
background
#F8F5FC
surface
#F0EAF8
border
#CBC6D1
text
#0C0512
muted
#7D7981

Preview Lab

Preview with #4020A5

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

Preview Lab → · Contrast checker → · Palette generator →

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