#21126B#21126B

#21126B is a dark, vivid violet. Relative luminance 0.018; OKLCH L 27.8% C 0.142 H 279.5°. Best body text is #FFFFFF at 15.40:1 contrast (WCAG AA passes).

Color values

HEX#21126B
RGBrgb(33, 18, 107)
HSLhsl(250, 71%, 25%)
HSVhsv(250, 83%, 42%)
CMYKcmyk(69.2%, 83.2%, 0%, 58%)
CIE-LABlab(14.50, 34.84, -48.54)
CIE-LCHlch(14.50, 59.75, 305.67°)
OKLaboklab(27.85% 0.0235 -0.1402)
OKLCHoklch(27.85% 0.142 279.5)
XYZxyz(3.4965, 1.8172, 14.0736)
Luminance0.0182 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#21126B #5C6B12
analogous
#12306B #21126B #4E126B
triadic
#21126B #6B2112 #126B21
tetradic
#21126B #6B1230 #5C6B12 #126B4E
square
#21126B #6B1230 #5C6B12 #126B4E
split-complementary
#21126B #6B4E12 #306B12
monochromatic
#08041A #110937 #21126B #311B9F #4124D4

Accessibility & contrast

On white

15.40
#21126B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.36
#21126B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #21126B
15.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##21126B#FFFFFF#000000##FFFFFF
##21126B1.0015.401.3615.40
#FFFFFF15.401.0021.001.00
#0000001.3621.001.0021.00
##FFFFFF15.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00286D
Deuteranopia (green-blind)
#002169
Tritanopia (blue-blind)
#002D3E
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #21126b;
/* rgb */ color: rgb(33, 18, 107);
/* oklch */ color: oklch(27.8% 0.142 279.5);
Tailwind
colors: {
  custom: {
    50: '#685396',
    500: '#21126b',
    950: '#000000',
  },
}
SCSS
$custom: #21126b;
$custom-light: #685396;
$custom-dark: #000000;
JSON
{
  "hex": "#21126b",
  "rgb": {
    "r": 33,
    "g": 18,
    "b": 107
  },
  "hsl": {
    "h": 250.112,
    "s": 71.2,
    "l": 24.51
  },
  "oklch": {
    "l": 0.27845,
    "c": 0.14211,
    "h": 279.5
  },
  "luminance": 0.01817
}

Semantic roles & 50–950 ramp

primary
#21126B
secondary
#90A236
accent
#EE3AD0
background
#F6F4F9
surface
#ECE7F2
border
#C7C3CC
text
#07020D
muted
#7A787E

Preview Lab

Preview with #21126B

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

Preview Lab → · Contrast checker → · Palette generator →

#21126B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva