#4020A8#4020A8

#4020A8 is a dark, vivid violet. Relative luminance 0.050; OKLCH L 39.0% C 0.198 H 283.1°. Best body text is #FFFFFF at 10.55:1 contrast (WCAG AA passes).

Color values

HEX#4020A8
RGBrgb(64, 32, 168)
HSLhsl(254, 68%, 39%)
HSVhsv(254, 81%, 66%)
CMYKcmyk(61.9%, 81%, 0%, 34.1%)
CIE-LABlab(26.59, 50.05, -66.74)
CIE-LCHlch(26.59, 83.42, 306.87°)
OKLaboklab(38.98% 0.0447 -0.1925)
OKLCHoklch(38.98% 0.198 283.1)
XYZxyz(9.6966, 4.9495, 37.4826)
Luminance0.0495 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4020A8 #88A820
analogous
#2044A8 #4020A8 #8420A8
triadic
#4020A8 #A84020 #20A840
tetradic
#4020A8 #A82044 #88A820 #20A884
square
#4020A8 #A82044 #88A820 #20A884
split-complementary
#4020A8 #A88420 #44A820
monochromatic
#190C41 #2C1675 #4020A8 #562ED7 #7F61E1

Accessibility & contrast

On white

10.55
#4020A8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.99
#4020A8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4020A8
10.55:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4020A8#FFFFFF#000000##FFFFFF
##4020A81.0010.551.9910.55
#FFFFFF10.551.0021.001.00
#0000001.9921.001.0021.00
##FFFFFF10.551.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0043AC
Deuteranopia (green-blind)
#003AA6
Tritanopia (blue-blind)
#004965
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #4020a8;
/* rgb */ color: rgb(64, 32, 168);
/* oklch */ color: oklch(39.0% 0.198 283.1);
Tailwind
colors: {
  custom: {
    50: '#8361c3',
    500: '#4020a8',
    950: '#000000',
  },
}
SCSS
$custom: #4020a8;
$custom-light: #8361c3;
$custom-dark: #000000;
JSON
{
  "hex": "#4020a8",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 168
  },
  "hsl": {
    "h": 254.118,
    "s": 68,
    "l": 39.216
  },
  "oklch": {
    "l": 0.38981,
    "c": 0.19759,
    "h": 283.1
  },
  "luminance": 0.0495
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #4020A8

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

Preview Lab → · Contrast checker → · Palette generator →

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