#4021C2#4021C2

#4021C2 is a dark, highly saturated violet. Relative luminance 0.061; OKLCH L 41.9% C 0.226 H 279.1°. Best body text is #FFFFFF at 9.48:1 contrast (WCAG AA passes).

Color values

HEX#4021C2
RGBrgb(64, 33, 194)
HSLhsl(252, 71%, 45%)
HSVhsv(252, 83%, 76%)
CMYKcmyk(67%, 83%, 0%, 23.9%)
CIE-LABlab(29.59, 57.02, -77.27)
CIE-LCHlch(29.59, 96.03, 306.43°)
OKLaboklab(41.89% 0.0358 -0.2231)
OKLCHoklch(41.89% 0.226 279.1)
XYZxyz(12.3927, 6.0717, 51.5474)
Luminance0.0607 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4021C2 #A3C221
analogous
#2152C2 #4021C2 #9121C2
triadic
#4021C2 #C24021 #21C240
tetradic
#4021C2 #C22152 #A3C221 #21C291
square
#4021C2 #C22152 #A3C221 #21C291
split-complementary
#4021C2 #C29121 #52C221
monochromatic
#1D0F59 #2F188E #4021C2 #6041DF #8C76E8

Accessibility & contrast

On white

9.48
#4021C2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.21
#4021C2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4021C2
9.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4021C2#FFFFFF#000000##FFFFFF
##4021C21.009.482.219.48
#FFFFFF9.481.0021.001.00
#0000002.2121.001.0021.00
##FFFFFF9.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CC6
Deuteranopia (green-blind)
#003FBF
Tritanopia (blue-blind)
#005574
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #4021c2;
/* rgb */ color: rgb(64, 33, 194);
/* oklch */ color: oklch(41.9% 0.226 279.1);
Tailwind
colors: {
  custom: {
    50: '#8863d6',
    500: '#4021c2',
    950: '#000000',
  },
}
SCSS
$custom: #4021c2;
$custom-light: #8863d6;
$custom-dark: #000000;
JSON
{
  "hex": "#4021c2",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 194
  },
  "hsl": {
    "h": 251.553,
    "s": 70.925,
    "l": 44.51
  },
  "oklch": {
    "l": 0.4189,
    "c": 0.22597,
    "h": 279.1
  },
  "luminance": 0.06073
}

Semantic roles & 50–950 ramp

primary
#4021C2
secondary
#BDCF70
accent
#EE3ACB
background
#F9F6FD
surface
#F1EBFA
border
#CBC6D3
text
#0D0615
muted
#7E7A83

Preview Lab

Preview with #4021C2

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

Preview Lab → · Contrast checker → · Palette generator →

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