#21158A#21158A

#21158A is a dark, vivid blue. Relative luminance 0.027; OKLCH L 31.9% C 0.178 H 274.1°. Best body text is #FFFFFF at 13.65:1 contrast (WCAG AA passes).

Color values

HEX#21158A
RGBrgb(33, 21, 138)
HSLhsl(246, 74%, 31%)
HSVhsv(246, 85%, 54%)
CMYKcmyk(76.1%, 84.8%, 0%, 45.9%)
CIE-LABlab(18.77, 43.28, -61.31)
CIE-LCHlch(18.77, 75.05, 305.22°)
OKLaboklab(31.91% 0.0128 -0.1773)
OKLCHoklch(31.91% 0.178 274.1)
XYZxyz(5.4813, 2.6941, 24.2710)
Luminance0.0270 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#21158A #7E8A15
analogous
#15438A #21158A #5B158A
triadic
#21158A #8A2115 #158A21
tetradic
#21158A #8A1543 #7E8A15 #158A5B
square
#21158A #8A1543 #7E8A15 #158A5B
split-complementary
#21158A #8A5B15 #438A15
monochromatic
#080520 #140D55 #21158A #2E1DBF #4A39E1

Accessibility & contrast

On white

13.65
#21158A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#21158A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #21158A
13.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##21158A#FFFFFF#000000##FFFFFF
##21158A1.0013.651.5413.65
#FFFFFF13.651.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00338D
Deuteranopia (green-blind)
#002888
Tritanopia (blue-blind)
#003B51
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #21158a;
/* rgb */ color: rgb(33, 21, 138);
/* oklch */ color: oklch(31.9% 0.178 274.1);
Tailwind
colors: {
  custom: {
    50: '#7057ad',
    500: '#21158a',
    950: '#000000',
  },
}
SCSS
$custom: #21158a;
$custom-light: #7057ad;
$custom-dark: #000000;
JSON
{
  "hex": "#21158a",
  "rgb": {
    "r": 33,
    "g": 21,
    "b": 138
  },
  "hsl": {
    "h": 246.154,
    "s": 73.585,
    "l": 31.176
  },
  "oklch": {
    "l": 0.31907,
    "c": 0.17775,
    "h": 274.1
  },
  "luminance": 0.02695
}

Semantic roles & 50–950 ramp

primary
#21158A
secondary
#B1BE3D
accent
#F038DD
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090310
muted
#7B787F

Preview Lab

Preview with #21158A

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

Preview Lab → · Contrast checker → · Palette generator →

#21158A Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva