#21228D#21228D

#21228D is a dark, vivid blue. Relative luminance 0.034; OKLCH L 33.9% C 0.170 H 272.4°. Best body text is #FFFFFF at 12.51:1 contrast (WCAG AA passes).

Color values

HEX#21228D
RGBrgb(33, 34, 141)
HSLhsl(239, 62%, 34%)
HSVhsv(239, 77%, 55%)
CMYKcmyk(76.6%, 75.9%, 0%, 44.7%)
CIE-LABlab(21.54, 37.33, -58.60)
CIE-LCHlch(21.54, 69.48, 302.49°)
OKLaboklab(33.95% 0.007 -0.1696)
OKLCHoklch(33.95% 0.17 272.4)
XYZxyz(6.0053, 3.3898, 25.5319)
Luminance0.0339 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#21228D #8D8C21
analogous
#21588D #21228D #56218D
triadic
#21228D #8D2122 #228D21
tetradic
#21228D #8D2158 #8D8C21 #218D56
square
#21228D #8D2158 #8D8C21 #218D56
split-complementary
#21228D #8D5621 #588D21
monochromatic
#0A0A2A #15165B #21228D #2D2EBF #5253D6

Accessibility & contrast

On white

12.51
#21228D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#21228D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #21228D
12.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##21228D#FFFFFF#000000##FFFFFF
##21228D1.0012.511.6812.51
#FFFFFF12.511.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003990
Deuteranopia (green-blind)
#002E8B
Tritanopia (blue-blind)
#004156
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #21228d;
/* rgb */ color: rgb(33, 34, 141);
/* oklch */ color: oklch(33.9% 0.170 272.4);
Tailwind
colors: {
  custom: {
    50: '#6f5eaf',
    500: '#21228d',
    950: '#000000',
  },
}
SCSS
$custom: #21228d;
$custom-light: #6f5eaf;
$custom-dark: #000000;
JSON
{
  "hex": "#21228d",
  "rgb": {
    "r": 33,
    "g": 34,
    "b": 141
  },
  "hsl": {
    "h": 239.444,
    "s": 62.069,
    "l": 34.118
  },
  "oklch": {
    "l": 0.33948,
    "c": 0.16975,
    "h": 272.4
  },
  "luminance": 0.0339
}

Semantic roles & 50–950 ramp

primary
#21228D
secondary
#BAB950
accent
#E443E5
background
#F7F5FA
surface
#EDE9F5
border
#C8C5CF
text
#090411
muted
#7B7980

Preview Lab

Preview with #21228D

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

Preview Lab → · Contrast checker → · Palette generator →

#21228D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva