#21238C#21238C

#21238C is a dark, vivid blue. Relative luminance 0.034; OKLCH L 34.0% C 0.167 H 272.3°. Best body text is #FFFFFF at 12.47:1 contrast (WCAG AA passes).

Color values

HEX#21238C
RGBrgb(33, 35, 140)
HSLhsl(239, 62%, 34%)
HSVhsv(239, 76%, 55%)
CMYKcmyk(76.4%, 75%, 0%, 45.1%)
CIE-LABlab(21.65, 36.38, -57.81)
CIE-LCHlch(21.65, 68.30, 302.18°)
OKLaboklab(33.99% 0.0067 -0.1673)
OKLCHoklch(33.99% 0.167 272.3)
XYZxyz(5.9603, 3.4182, 25.1515)
Luminance0.0342 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#21238C #8C8A21
analogous
#21598C #21238C #55218C
triadic
#21238C #8C2123 #238C21
tetradic
#21238C #8C2159 #8C8A21 #218C55
square
#21238C #8C2159 #8C8A21 #218C55
split-complementary
#21238C #8C5521 #598C21
monochromatic
#0A0A29 #15175A #21238C #2D2FBE #5154D6

Accessibility & contrast

On white

12.47
#21238C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#21238C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #21238C
12.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##21238C#FFFFFF#000000##FFFFFF
##21238C1.0012.471.6812.47
#FFFFFF12.471.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398F
Deuteranopia (green-blind)
#002F8A
Tritanopia (blue-blind)
#004155
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #21238c;
/* rgb */ color: rgb(33, 35, 140);
/* oklch */ color: oklch(34.0% 0.167 272.3);
Tailwind
colors: {
  custom: {
    50: '#6f5faf',
    500: '#21238c',
    950: '#000000',
  },
}
SCSS
$custom: #21238c;
$custom-light: #6f5faf;
$custom-dark: #000000;
JSON
{
  "hex": "#21238c",
  "rgb": {
    "r": 33,
    "g": 35,
    "b": 140
  },
  "hsl": {
    "h": 238.879,
    "s": 61.85,
    "l": 33.922
  },
  "oklch": {
    "l": 0.33989,
    "c": 0.16743,
    "h": 272.3
  },
  "luminance": 0.03419
}

Semantic roles & 50–950 ramp

primary
#21238C
secondary
#B9B74F
accent
#E243E5
background
#F7F5FA
surface
#EDE9F5
border
#C8C5CF
text
#090410
muted
#7B797F

Preview Lab

Preview with #21238C

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

Preview Lab → · Contrast checker → · Palette generator →

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