#4020A2#4020A2

#4020A2 is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.4% C 0.191 H 284.1°. Best body text is #FFFFFF at 10.79:1 contrast (WCAG AA passes).

Color values

HEX#4020A2
RGBrgb(64, 32, 162)
HSLhsl(255, 67%, 38%)
HSVhsv(255, 80%, 64%)
CMYKcmyk(60.5%, 80.2%, 0%, 36.5%)
CIE-LABlab(25.95, 48.32, -64.15)
CIE-LCHlch(25.95, 80.32, 306.99°)
OKLaboklab(38.35% 0.0466 -0.1849)
OKLCHoklch(38.35% 0.191 284.1)
XYZxyz(9.1504, 4.7310, 34.6064)
Luminance0.0473 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4020A2 #82A220
analogous
#2041A2 #4020A2 #8120A2
triadic
#4020A2 #A24020 #20A240
tetradic
#4020A2 #A22041 #82A220 #20A281
square
#4020A2 #A22041 #82A220 #20A281
split-complementary
#4020A2 #A28120 #41A220
monochromatic
#180C3C #2C166F #4020A2 #542AD5 #7D5DDF

Accessibility & contrast

On white

10.79
#4020A2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#4020A2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4020A2
10.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4020A2#FFFFFF#000000##FFFFFF
##4020A21.0010.791.9510.79
#FFFFFF10.791.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0041A6
Deuteranopia (green-blind)
#0039A0
Tritanopia (blue-blind)
#004761
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #4020a2;
/* rgb */ color: rgb(64, 32, 162);
/* oklch */ color: oklch(38.4% 0.191 284.1);
Tailwind
colors: {
  custom: {
    50: '#8261bf',
    500: '#4020a2',
    950: '#000000',
  },
}
SCSS
$custom: #4020a2;
$custom-light: #8261bf;
$custom-dark: #000000;
JSON
{
  "hex": "#4020a2",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 162
  },
  "hsl": {
    "h": 254.769,
    "s": 67.01,
    "l": 38.039
  },
  "oklch": {
    "l": 0.38351,
    "c": 0.19071,
    "h": 284.1
  },
  "luminance": 0.04732
}

Semantic roles & 50–950 ramp

primary
#4020A2
secondary
#AAC35A
accent
#EA3EC0
background
#F8F5FB
surface
#F0EAF7
border
#CBC6D0
text
#0C0512
muted
#7D7981

Preview Lab

Preview with #4020A2

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

Preview Lab → · Contrast checker → · Palette generator →

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