#21228B#21228B

#21228B is a dark, vivid blue. Relative luminance 0.033; OKLCH L 33.7% C 0.167 H 272.5°. Best body text is #FFFFFF at 12.60:1 contrast (WCAG AA passes).

Color values

HEX#21228B
RGBrgb(33, 34, 139)
HSLhsl(239, 62%, 34%)
HSVhsv(239, 76%, 55%)
CMYKcmyk(76.3%, 75.5%, 0%, 45.5%)
CIE-LABlab(21.32, 36.63, -57.72)
CIE-LCHlch(21.32, 68.36, 302.40°)
OKLaboklab(33.73% 0.0073 -0.167)
OKLCHoklch(33.73% 0.167 272.5)
XYZxyz(5.8579, 3.3309, 24.7553)
Luminance0.0333 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#21228B #8B8A21
analogous
#21578B #21228B #55218B
triadic
#21228B #8B2122 #228B21
tetradic
#21228B #8B2157 #8B8A21 #218B55
square
#21228B #8B2157 #8B8A21 #218B55
split-complementary
#21228B #8B5521 #578B21
monochromatic
#0A0A28 #15165A #21228B #2D2EBC #5152D6

Accessibility & contrast

On white

12.60
#21228B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#21228B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #21228B
12.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##21228B#FFFFFF#000000##FFFFFF
##21228B1.0012.601.6712.60
#FFFFFF12.601.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388E
Deuteranopia (green-blind)
#002E89
Tritanopia (blue-blind)
#004054
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #21228b;
/* rgb */ color: rgb(33, 34, 139);
/* oklch */ color: oklch(33.7% 0.167 272.5);
Tailwind
colors: {
  custom: {
    50: '#6f5eae',
    500: '#21228b',
    950: '#000000',
  },
}
SCSS
$custom: #21228b;
$custom-light: #6f5eae;
$custom-dark: #000000;
JSON
{
  "hex": "#21228b",
  "rgb": {
    "r": 33,
    "g": 34,
    "b": 139
  },
  "hsl": {
    "h": 239.434,
    "s": 61.628,
    "l": 33.725
  },
  "oklch": {
    "l": 0.33727,
    "c": 0.16719,
    "h": 272.5
  },
  "luminance": 0.03331
}

Semantic roles & 50–950 ramp

primary
#21228B
secondary
#B9B84F
accent
#E343E5
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #21228B

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

Preview Lab → · Contrast checker → · Palette generator →

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