#21228C#21228C

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

Color values

HEX#21228C
RGBrgb(33, 34, 140)
HSLhsl(239, 62%, 34%)
HSVhsv(239, 76%, 55%)
CMYKcmyk(76.4%, 75.7%, 0%, 45.1%)
CIE-LABlab(21.43, 36.98, -58.16)
CIE-LCHlch(21.43, 68.92, 302.45°)
OKLaboklab(33.84% 0.0072 -0.1683)
OKLCHoklch(33.84% 0.168 272.4)
XYZxyz(5.9313, 3.3602, 25.1419)
Luminance0.0336 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#21228C #8C8B21
analogous
#21588C #21228C #56218C
triadic
#21228C #8C2122 #228C21
tetradic
#21228C #8C2158 #8C8B21 #218C56
square
#21228C #8C2158 #8C8B21 #218C56
split-complementary
#21228C #8C5621 #588C21
monochromatic
#0A0A29 #15165A #21228C #2D2EBE #5153D6

Accessibility & contrast

On white

12.56
#21228C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #21228C
12.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##21228C#FFFFFF#000000##FFFFFF
##21228C1.0012.561.6712.56
#FFFFFF12.561.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398F
Deuteranopia (green-blind)
#002E8A
Tritanopia (blue-blind)
#004155
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #21228c;
/* rgb */ color: rgb(33, 34, 140);
/* oklch */ color: oklch(33.8% 0.168 272.4);
Tailwind
colors: {
  custom: {
    50: '#6f5eaf',
    500: '#21228c',
    950: '#000000',
  },
}
SCSS
$custom: #21228c;
$custom-light: #6f5eaf;
$custom-dark: #000000;
JSON
{
  "hex": "#21228c",
  "rgb": {
    "r": 33,
    "g": 34,
    "b": 140
  },
  "hsl": {
    "h": 239.439,
    "s": 61.85,
    "l": 33.922
  },
  "oklch": {
    "l": 0.33837,
    "c": 0.16847,
    "h": 272.4
  },
  "luminance": 0.03361
}

Semantic roles & 50–950 ramp

primary
#21228C
secondary
#B9B84F
accent
#E343E5
background
#F7F5FA
surface
#EDE9F5
border
#C8C5CF
text
#090410
muted
#7B797F

Preview Lab

Preview with #21228C

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

Preview Lab → · Contrast checker → · Palette generator →

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