#21227C#21227C

#21227C is a dark, vivid blue. Relative luminance 0.029; OKLCH L 32.1% C 0.147 H 273.8°. Best body text is #FFFFFF at 13.25:1 contrast (WCAG AA passes).

Color values

HEX#21227C
RGBrgb(33, 34, 124)
HSLhsl(239, 58%, 31%)
HSVhsv(239, 73%, 49%)
CMYKcmyk(73.4%, 72.6%, 0%, 51.4%)
CIE-LABlab(19.73, 31.27, -50.89)
CIE-LCHlch(19.73, 59.73, 301.57°)
OKLaboklab(32.11% 0.0099 -0.1471)
OKLCHoklch(32.11% 0.147 273.8)
XYZxyz(4.8361, 2.9222, 19.3740)
Luminance0.0292 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#21227C #7C7B21
analogous
#214F7C #21227C #4D217C
triadic
#21227C #7C2122 #227C21
tetradic
#21227C #7C214F #7C7B21 #217C4D
square
#21227C #7C214F #7C7B21 #217C4D
split-complementary
#21227C #7C4D21 #4F7C21
monochromatic
#07071B #14154C #21227C #2E2FAC #494ACF

Accessibility & contrast

On white

13.25
#21227C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#21227C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #21227C
13.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##21227C#FFFFFF#000000##FFFFFF
##21227C1.0013.251.5813.25
#FFFFFF13.251.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00347F
Deuteranopia (green-blind)
#002B7A
Tritanopia (blue-blind)
#003B4C
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #21227c;
/* rgb */ color: rgb(33, 34, 124);
/* oklch */ color: oklch(32.1% 0.147 273.8);
Tailwind
colors: {
  custom: {
    50: '#6b5ea3',
    500: '#21227c',
    950: '#000000',
  },
}
SCSS
$custom: #21227c;
$custom-light: #6b5ea3;
$custom-dark: #000000;
JSON
{
  "hex": "#21227c",
  "rgb": {
    "r": 33,
    "g": 34,
    "b": 124
  },
  "hsl": {
    "h": 239.341,
    "s": 57.962,
    "l": 30.784
  },
  "oklch": {
    "l": 0.3211,
    "c": 0.14745,
    "h": 273.8
  },
  "luminance": 0.02923
}

Semantic roles & 50–950 ramp

primary
#21227C
secondary
#AFAE4A
accent
#DF47E1
background
#F6F5FA
surface
#ECE9F4
border
#C7C5CE
text
#08040F
muted
#7A797F

Preview Lab

Preview with #21227C

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

Preview Lab → · Contrast checker → · Palette generator →

#21227C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva