#4020C2#4020C2

#4020C2 is a dark, highly saturated violet. Relative luminance 0.060; OKLCH L 41.8% C 0.227 H 279.2°. Best body text is #FFFFFF at 9.53:1 contrast (WCAG AA passes).

Color values

HEX#4020C2
RGBrgb(64, 32, 194)
HSLhsl(252, 72%, 44%)
HSVhsv(252, 84%, 76%)
CMYKcmyk(67%, 83.5%, 0%, 23.9%)
CIE-LABlab(29.46, 57.43, -77.50)
CIE-LCHlch(29.46, 96.45, 306.54°)
OKLaboklab(41.8% 0.0362 -0.2238)
OKLCHoklch(41.8% 0.227 279.2)
XYZxyz(12.3654, 6.0170, 51.5382)
Luminance0.0602 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4020C2 #A2C220
analogous
#2051C2 #4020C2 #9120C2
triadic
#4020C2 #C24020 #20C240
tetradic
#4020C2 #C22051 #A2C220 #20C291
square
#4020C2 #C22051 #A2C220 #20C291
split-complementary
#4020C2 #C29120 #51C220
monochromatic
#1D0F59 #2F178D #4020C2 #5F40DF #8B74E8

Accessibility & contrast

On white

9.53
#4020C2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.20
#4020C2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4020C2
9.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4020C2#FFFFFF#000000##FFFFFF
##4020C21.009.532.209.53
#FFFFFF9.531.0021.001.00
#0000002.2021.001.0021.00
##FFFFFF9.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BC6
Deuteranopia (green-blind)
#003FBF
Tritanopia (blue-blind)
#005474
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #4020c2;
/* rgb */ color: rgb(64, 32, 194);
/* oklch */ color: oklch(41.8% 0.227 279.2);
Tailwind
colors: {
  custom: {
    50: '#8863d6',
    500: '#4020c2',
    950: '#000000',
  },
}
SCSS
$custom: #4020c2;
$custom-light: #8863d6;
$custom-dark: #000000;
JSON
{
  "hex": "#4020c2",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 194
  },
  "hsl": {
    "h": 251.852,
    "s": 71.681,
    "l": 44.314
  },
  "oklch": {
    "l": 0.41796,
    "c": 0.22667,
    "h": 279.2
  },
  "luminance": 0.06018
}

Semantic roles & 50–950 ramp

primary
#4020C2
secondary
#BCCF6F
accent
#EE39CB
background
#F9F6FD
surface
#F1EBFA
border
#CBC6D3
text
#0D0615
muted
#7E7A83

Preview Lab

Preview with #4020C2

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

Preview Lab → · Contrast checker → · Palette generator →

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