#212798#212798

#212798 is a dark, vivid blue. Relative luminance 0.040; OKLCH L 35.9% C 0.179 H 270.9°. Best body text is #FFFFFF at 11.61:1 contrast (WCAG AA passes).

Color values

HEX#212798
RGBrgb(33, 39, 152)
HSLhsl(237, 64%, 36%)
HSVhsv(237, 78%, 60%)
CMYKcmyk(78.3%, 74.3%, 0%, 40.4%)
CIE-LABlab(23.81, 38.19, -61.67)
CIE-LCHlch(23.81, 72.54, 301.77°)
OKLaboklab(35.91% 0.0028 -0.1786)
OKLCHoklch(35.91% 0.179 270.9)
XYZxyz(7.0183, 4.0406, 30.1097)
Luminance0.0404 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#212798 #989221
analogous
#216398 #212798 #572198
triadic
#212798 #982127 #279821
tetradic
#212798 #982163 #989221 #219857
square
#212798 #982163 #989221 #219857
split-complementary
#212798 #985721 #639821
monochromatic
#0B0D33 #161A66 #212798 #2C34CA #595FDB

Accessibility & contrast

On white

11.61
#212798 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#212798 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #212798
11.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##212798#FFFFFF#000000##FFFFFF
##2127981.0011.611.8111.61
#FFFFFF11.611.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E9B
Deuteranopia (green-blind)
#003396
Tritanopia (blue-blind)
#00485D
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #212798;
/* rgb */ color: rgb(33, 39, 152);
/* oklch */ color: oklch(35.9% 0.179 270.9);
Tailwind
colors: {
  custom: {
    50: '#7262b7',
    500: '#212798',
    950: '#000000',
  },
}
SCSS
$custom: #212798;
$custom-light: #7262b7;
$custom-dark: #000000;
JSON
{
  "hex": "#212798",
  "rgb": {
    "r": 33,
    "g": 39,
    "b": 152
  },
  "hsl": {
    "h": 236.975,
    "s": 64.324,
    "l": 36.275
  },
  "oklch": {
    "l": 0.35914,
    "c": 0.17859,
    "h": 270.9
  },
  "luminance": 0.04041
}

Semantic roles & 50–950 ramp

primary
#212798
secondary
#BFBA56
accent
#DF40E7
background
#F7F5FB
surface
#EEEAF6
border
#C9C6D0
text
#090511
muted
#7B7980

Preview Lab

Preview with #212798

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

Preview Lab → · Contrast checker → · Palette generator →

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