#21178B#21178B

#21178B is a dark, vivid blue. Relative luminance 0.028; OKLCH L 32.3% C 0.177 H 273.8°. Best body text is #FFFFFF at 13.46:1 contrast (WCAG AA passes).

Color values

HEX#21178B
RGBrgb(33, 23, 139)
HSLhsl(245, 72%, 32%)
HSVhsv(245, 83%, 55%)
CMYKcmyk(76.3%, 83.5%, 0%, 45.5%)
CIE-LABlab(19.22, 42.65, -61.19)
CIE-LCHlch(19.22, 74.59, 304.87°)
OKLaboklab(32.25% 0.0119 -0.177)
OKLCHoklch(32.25% 0.177 273.8)
XYZxyz(5.5922, 2.7996, 24.6668)
Luminance0.0280 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#21178B #818B17
analogous
#17478B #21178B #5B178B
triadic
#21178B #8B2117 #178B21
tetradic
#21178B #8B1747 #818B17 #178B5B
square
#21178B #8B1747 #818B17 #178B5B
split-complementary
#21178B #8B5B17 #478B17
monochromatic
#080622 #150E56 #21178B #2D20C0 #4B3DDF

Accessibility & contrast

On white

13.46
#21178B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#21178B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #21178B
13.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##21178B#FFFFFF#000000##FFFFFF
##21178B1.0013.461.5613.46
#FFFFFF13.461.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00348E
Deuteranopia (green-blind)
#002989
Tritanopia (blue-blind)
#003C52
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #21178b;
/* rgb */ color: rgb(33, 23, 139);
/* oklch */ color: oklch(32.3% 0.177 273.8);
Tailwind
colors: {
  custom: {
    50: '#7058ae',
    500: '#21178b',
    950: '#000000',
  },
}
SCSS
$custom: #21178b;
$custom-light: #7058ae;
$custom-dark: #000000;
JSON
{
  "hex": "#21178b",
  "rgb": {
    "r": 33,
    "g": 23,
    "b": 139
  },
  "hsl": {
    "h": 245.172,
    "s": 71.605,
    "l": 31.765
  },
  "oklch": {
    "l": 0.32252,
    "c": 0.17739,
    "h": 273.8
  },
  "luminance": 0.028
}

Semantic roles & 50–950 ramp

primary
#21178B
secondary
#B4BF3F
accent
#EE39DF
background
#F7F5FA
surface
#EDE9F5
border
#C8C5CF
text
#090310
muted
#7B787F

Preview Lab

Preview with #21178B

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

Preview Lab → · Contrast checker → · Palette generator →

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