#212171#212171

#212171 is a dark, vivid blue. Relative luminance 0.026; OKLCH L 30.8% C 0.134 H 275.2°. Best body text is #FFFFFF at 13.81:1 contrast (WCAG AA passes).

Color values

HEX#212171
RGBrgb(33, 33, 113)
HSLhsl(240, 55%, 29%)
HSVhsv(240, 71%, 44%)
CMYKcmyk(70.8%, 70.8%, 0%, 55.7%)
CIE-LABlab(18.38, 27.90, -46.05)
CIE-LCHlch(18.38, 53.84, 301.20°)
OKLaboklab(30.8% 0.0121 -0.133)
OKLCHoklch(30.8% 0.134 275.2)
XYZxyz(4.1507, 2.6029, 15.9033)
Luminance0.0260 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#212171 #717121
analogous
#214971 #212171 #492171
triadic
#212171 #712121 #217121
tetradic
#212171 #712149 #717121 #217149
square
#212171 #712149 #717121 #217149
split-complementary
#212171 #714921 #497121
monochromatic
#070718 #131342 #212171 #2F2FA0 #4444C8

Accessibility & contrast

On white

13.81
#212171 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#212171 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #212171
13.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##212171#FFFFFF#000000##FFFFFF
##2121711.0013.811.5213.81
#FFFFFF13.811.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003073
Deuteranopia (green-blind)
#00296F
Tritanopia (blue-blind)
#003646
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #212171;
/* rgb */ color: rgb(33, 33, 113);
/* oklch */ color: oklch(30.8% 0.134 275.2);
Tailwind
colors: {
  custom: {
    50: '#685d9b',
    500: '#212171',
    950: '#000000',
  },
}
SCSS
$custom: #212171;
$custom-light: #685d9b;
$custom-dark: #000000;
JSON
{
  "hex": "#212171",
  "rgb": {
    "r": 33,
    "g": 33,
    "b": 113
  },
  "hsl": {
    "h": 240,
    "s": 54.795,
    "l": 28.627
  },
  "oklch": {
    "l": 0.30797,
    "c": 0.13354,
    "h": 275.2
  },
  "luminance": 0.02603
}

Semantic roles & 50–950 ramp

primary
#212171
secondary
#A5A549
accent
#DE4ADE
background
#F6F5F9
surface
#EBE9F2
border
#C6C5CC
text
#07040E
muted
#7A797E

Preview Lab

Preview with #212171

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

Preview Lab → · Contrast checker → · Palette generator →

#212171 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva