#21178E#21178E

#21178E is a dark, vivid blue. Relative luminance 0.029; OKLCH L 32.6% C 0.181 H 273.5°. Best body text is #FFFFFF at 13.31:1 contrast (WCAG AA passes).

Color values

HEX#21178E
RGBrgb(33, 23, 142)
HSLhsl(245, 72%, 32%)
HSVhsv(245, 84%, 56%)
CMYKcmyk(76.8%, 83.8%, 0%, 44.3%)
CIE-LABlab(19.59, 43.60, -62.45)
CIE-LCHlch(19.59, 76.17, 304.92°)
OKLaboklab(32.61% 0.0111 -0.1806)
OKLCHoklch(32.61% 0.181 273.5)
XYZxyz(5.8145, 2.8885, 25.8370)
Luminance0.0289 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#21178E #848E17
analogous
#17498E #21178E #5D178E
triadic
#21178E #8E2117 #178E21
tetradic
#21178E #8E1749 #848E17 #178E5D
square
#21178E #8E1749 #848E17 #178E5D
split-complementary
#21178E #8E5D17 #498E17
monochromatic
#090625 #150E59 #21178E #2D20C3 #4D3FE0

Accessibility & contrast

On white

13.31
#21178E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#21178E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #21178E
13.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##21178E#FFFFFF#000000##FFFFFF
##21178E1.0013.311.5813.31
#FFFFFF13.311.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003591
Deuteranopia (green-blind)
#002A8C
Tritanopia (blue-blind)
#003D54
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #21178e;
/* rgb */ color: rgb(33, 23, 142);
/* oklch */ color: oklch(32.6% 0.181 273.5);
Tailwind
colors: {
  custom: {
    50: '#7158b0',
    500: '#21178e',
    950: '#000000',
  },
}
SCSS
$custom: #21178e;
$custom-light: #7158b0;
$custom-dark: #000000;
JSON
{
  "hex": "#21178e",
  "rgb": {
    "r": 33,
    "g": 23,
    "b": 142
  },
  "hsl": {
    "h": 245.042,
    "s": 72.121,
    "l": 32.353
  },
  "oklch": {
    "l": 0.32614,
    "c": 0.18099,
    "h": 273.5
  },
  "luminance": 0.02889
}

Semantic roles & 50–950 ramp

primary
#21178E
secondary
#B6C040
accent
#EF39E0
background
#F7F5FB
surface
#EDE9F6
border
#C8C5D0
text
#090311
muted
#7B7880

Preview Lab

Preview with #21178E

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

Preview Lab → · Contrast checker → · Palette generator →

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