#4021B2#4021B2

#4021B2 is a dark, highly saturated violet. Relative luminance 0.054; OKLCH L 40.2% C 0.208 H 281.4°. Best body text is #FFFFFF at 10.10:1 contrast (WCAG AA passes).

Color values

HEX#4021B2
RGBrgb(64, 33, 178)
HSLhsl(253, 69%, 41%)
HSVhsv(253, 81%, 70%)
CMYKcmyk(64%, 81.5%, 0%, 30.2%)
CIE-LABlab(27.82, 52.48, -70.71)
CIE-LCHlch(27.82, 88.06, 306.58°)
OKLaboklab(40.15% 0.041 -0.204)
OKLCHoklch(40.15% 0.208 281.4)
XYZxyz(10.6916, 5.3912, 42.5880)
Luminance0.0539 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4021B2 #93B221
analogous
#214AB2 #4021B2 #8921B2
triadic
#4021B2 #B24021 #21B240
tetradic
#4021B2 #B2214A #93B221 #21B289
square
#4021B2 #B2214A #93B221 #21B289
split-complementary
#4021B2 #B28921 #4AB221
monochromatic
#1B0E4B #2D177E #4021B2 #5936DA #846AE3

Accessibility & contrast

On white

10.10
#4021B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#4021B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4021B2
10.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4021B2#FFFFFF#000000##FFFFFF
##4021B21.0010.102.0810.10
#FFFFFF10.101.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046B6
Deuteranopia (green-blind)
#003CAF
Tritanopia (blue-blind)
#004E6B
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #4021b2;
/* rgb */ color: rgb(64, 33, 178);
/* oklch */ color: oklch(40.2% 0.208 281.4);
Tailwind
colors: {
  custom: {
    50: '#8462ca',
    500: '#4021b2',
    950: '#000000',
  },
}
SCSS
$custom: #4021b2;
$custom-light: #8462ca;
$custom-dark: #000000;
JSON
{
  "hex": "#4021b2",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 178
  },
  "hsl": {
    "h": 252.828,
    "s": 68.72,
    "l": 41.373
  },
  "oklch": {
    "l": 0.40151,
    "c": 0.20811,
    "h": 281.4
  },
  "luminance": 0.05392
}

Semantic roles & 50–950 ramp

primary
#4021B2
secondary
#B4C966
accent
#EC3CC6
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0513
muted
#7D7A82

Preview Lab

Preview with #4021B2

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

Preview Lab → · Contrast checker → · Palette generator →

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