#212797#212797

#212797 is a dark, vivid blue. Relative luminance 0.040; OKLCH L 35.8% C 0.177 H 271.0°. Best body text is #FFFFFF at 11.66:1 contrast (WCAG AA passes).

Color values

HEX#212797
RGBrgb(33, 39, 151)
HSLhsl(237, 64%, 36%)
HSVhsv(237, 78%, 59%)
CMYKcmyk(78.1%, 74.2%, 0%, 40.8%)
CIE-LABlab(23.70, 37.84, -61.23)
CIE-LCHlch(23.70, 71.98, 301.71°)
OKLaboklab(35.81% 0.003 -0.1773)
OKLCHoklch(35.81% 0.177 271)
XYZxyz(6.9367, 4.0080, 29.6802)
Luminance0.0401 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#212797 #979121
analogous
#216297 #212797 #562197
triadic
#212797 #972127 #279721
tetradic
#212797 #972162 #979121 #219756
square
#212797 #972162 #979121 #219756
split-complementary
#212797 #975621 #629721
monochromatic
#0B0D33 #161A65 #212797 #2C34C9 #585FDA

Accessibility & contrast

On white

11.66
#212797 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#212797 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #212797
11.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##212797#FFFFFF#000000##FFFFFF
##2127971.0011.661.8011.66
#FFFFFF11.661.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E9A
Deuteranopia (green-blind)
#003395
Tritanopia (blue-blind)
#00475C
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #212797;
/* rgb */ color: rgb(33, 39, 151);
/* oklch */ color: oklch(35.8% 0.177 271.0);
Tailwind
colors: {
  custom: {
    50: '#7262b7',
    500: '#212797',
    950: '#000000',
  },
}
SCSS
$custom: #212797;
$custom-light: #7262b7;
$custom-dark: #000000;
JSON
{
  "hex": "#212797",
  "rgb": {
    "r": 33,
    "g": 39,
    "b": 151
  },
  "hsl": {
    "h": 236.949,
    "s": 64.13,
    "l": 36.078
  },
  "oklch": {
    "l": 0.35806,
    "c": 0.17732,
    "h": 271
  },
  "luminance": 0.04009
}

Semantic roles & 50–950 ramp

primary
#212797
secondary
#BEB955
accent
#DF41E7
background
#F7F5FB
surface
#EDEAF6
border
#C8C6D0
text
#090511
muted
#7B7980

Preview Lab

Preview with #212797

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

Preview Lab → · Contrast checker → · Palette generator →

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