#31218B#31218B

#31218B is a dark, vivid blue. Relative luminance 0.036; OKLCH L 34.7% C 0.164 H 280.4°. Best body text is #FFFFFF at 12.20:1 contrast (WCAG AA passes).

Color values

HEX#31218B
RGBrgb(49, 33, 139)
HSLhsl(249, 62%, 34%)
HSVhsv(249, 76%, 55%)
CMYKcmyk(64.7%, 76.3%, 0%, 45.5%)
CIE-LABlab(22.32, 38.98, -56.04)
CIE-LCHlch(22.32, 68.26, 304.83°)
OKLaboklab(34.74% 0.0297 -0.1617)
OKLCHoklch(34.74% 0.164 280.4)
XYZxyz(6.4692, 3.6043, 24.7759)
Luminance0.0360 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31218B #7B8B21
analogous
#21468B #31218B #66218B
triadic
#31218B #8B3121 #218B31
tetradic
#31218B #8B2146 #7B8B21 #218B66
square
#31218B #8B2146 #7B8B21 #218B66
split-complementary
#31218B #8B6621 #468B21
monochromatic
#0E0A28 #20155A #31218B #422DBC #6551D6

Accessibility & contrast

On white

12.20
#31218B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.72
#31218B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31218B
12.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31218B#FFFFFF#000000##FFFFFF
##31218B1.0012.201.7212.20
#FFFFFF12.201.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398E
Deuteranopia (green-blind)
#003189
Tritanopia (blue-blind)
#003F54
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #31218b;
/* rgb */ color: rgb(49, 33, 139);
/* oklch */ color: oklch(34.7% 0.164 280.4);
Tailwind
colors: {
  custom: {
    50: '#765fae',
    500: '#31218b',
    950: '#000000',
  },
}
SCSS
$custom: #31218b;
$custom-light: #765fae;
$custom-dark: #000000;
JSON
{
  "hex": "#31218b",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 139
  },
  "hsl": {
    "h": 249.057,
    "s": 61.628,
    "l": 33.725
  },
  "oklch": {
    "l": 0.34741,
    "c": 0.16439,
    "h": 280.4
  },
  "luminance": 0.03605
}

Semantic roles & 50–950 ramp

primary
#31218B
secondary
#A9B94F
accent
#E543CC
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090510
muted
#7B797F

Preview Lab

Preview with #31218B

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

Preview Lab → · Contrast checker → · Palette generator →

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