#4021B4#4021B4

#4021B4 is a dark, highly saturated violet. Relative luminance 0.055; OKLCH L 40.4% C 0.210 H 281.1°. Best body text is #FFFFFF at 10.03:1 contrast (WCAG AA passes).

Color values

HEX#4021B4
RGBrgb(64, 33, 180)
HSLhsl(253, 69%, 42%)
HSVhsv(253, 82%, 71%)
CMYKcmyk(64.4%, 81.7%, 0%, 29.4%)
CIE-LABlab(28.04, 53.05, -71.54)
CIE-LCHlch(28.04, 89.07, 306.56°)
OKLaboklab(40.37% 0.0403 -0.2065)
OKLCHoklch(40.37% 0.21 281.1)
XYZxyz(10.8938, 5.4721, 43.6533)
Luminance0.0547 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4021B4 #95B421
analogous
#214CB4 #4021B4 #8A21B4
triadic
#4021B4 #B44021 #21B440
tetradic
#4021B4 #B4214C #95B421 #21B48A
square
#4021B4 #B4214C #95B421 #21B48A
split-complementary
#4021B4 #B48A21 #4CB421
monochromatic
#1B0E4D #2E1880 #4021B4 #5A38DA #856BE4

Accessibility & contrast

On white

10.03
#4021B4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#4021B4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4021B4
10.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4021B4#FFFFFF#000000##FFFFFF
##4021B41.0010.032.0910.03
#FFFFFF10.031.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047B8
Deuteranopia (green-blind)
#003DB1
Tritanopia (blue-blind)
#004F6C
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #4021b4;
/* rgb */ color: rgb(64, 33, 180);
/* oklch */ color: oklch(40.4% 0.210 281.1);
Tailwind
colors: {
  custom: {
    50: '#8562cc',
    500: '#4021b4',
    950: '#000000',
  },
}
SCSS
$custom: #4021b4;
$custom-light: #8562cc;
$custom-dark: #000000;
JSON
{
  "hex": "#4021b4",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 180
  },
  "hsl": {
    "h": 252.653,
    "s": 69.014,
    "l": 41.765
  },
  "oklch": {
    "l": 0.40366,
    "c": 0.21037,
    "h": 281.1
  },
  "luminance": 0.05473
}

Semantic roles & 50–950 ramp

primary
#4021B4
secondary
#B5CA67
accent
#EC3CC7
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0514
muted
#7D7A82

Preview Lab

Preview with #4021B4

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

Preview Lab → · Contrast checker → · Palette generator →

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