#21237F#21237F

#21237F is a dark, vivid blue. Relative luminance 0.031; OKLCH L 32.6% C 0.150 H 273.3°. Best body text is #FFFFFF at 13.03:1 contrast (WCAG AA passes).

Color values

HEX#21237F
RGBrgb(33, 35, 127)
HSLhsl(239, 59%, 31%)
HSVhsv(239, 74%, 50%)
CMYKcmyk(74%, 72.4%, 0%, 50.2%)
CIE-LABlab(20.27, 31.72, -51.90)
CIE-LCHlch(20.27, 60.83, 301.43°)
OKLaboklab(32.59% 0.0088 -0.1501)
OKLCHoklch(32.59% 0.15 273.3)
XYZxyz(5.0577, 3.0572, 20.3981)
Luminance0.0306 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#21237F #7F7D21
analogous
#21527F #21237F #4E217F
triadic
#21237F #7F2123 #237F21
tetradic
#21237F #7F2152 #7F7D21 #217F4E
square
#21237F #7F2152 #7F7D21 #217F4E
split-complementary
#21237F #7F4E21 #527F21
monochromatic
#08081E #14164E #21237F #2E30B0 #4A4DD0

Accessibility & contrast

On white

13.03
#21237F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#21237F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #21237F
13.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##21237F#FFFFFF#000000##FFFFFF
##21237F1.0013.031.6113.03
#FFFFFF13.031.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003582
Deuteranopia (green-blind)
#002C7D
Tritanopia (blue-blind)
#003C4E
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #21237f;
/* rgb */ color: rgb(33, 35, 127);
/* oklch */ color: oklch(32.6% 0.150 273.3);
Tailwind
colors: {
  custom: {
    50: '#6c5ea5',
    500: '#21237f',
    950: '#000000',
  },
}
SCSS
$custom: #21237f;
$custom-light: #6c5ea5;
$custom-dark: #000000;
JSON
{
  "hex": "#21237f",
  "rgb": {
    "r": 33,
    "g": 35,
    "b": 127
  },
  "hsl": {
    "h": 238.723,
    "s": 58.75,
    "l": 31.373
  },
  "oklch": {
    "l": 0.32593,
    "c": 0.15034,
    "h": 273.3
  },
  "luminance": 0.03058
}

Semantic roles & 50–950 ramp

primary
#21237F
secondary
#B2AF4A
accent
#DF46E2
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#08040F
muted
#7B797F

Preview Lab

Preview with #21237F

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

Preview Lab → · Contrast checker → · Palette generator →

#21237F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva