#31218D#31218D

#31218D is a dark, vivid blue. Relative luminance 0.037; OKLCH L 34.9% C 0.167 H 280.1°. Best body text is #FFFFFF at 12.12:1 contrast (WCAG AA passes).

Color values

HEX#31218D
RGBrgb(49, 33, 141)
HSLhsl(249, 62%, 34%)
HSVhsv(249, 77%, 55%)
CMYKcmyk(65.2%, 76.6%, 0%, 44.7%)
CIE-LABlab(22.53, 39.63, -56.94)
CIE-LCHlch(22.53, 69.37, 304.84°)
OKLaboklab(34.95% 0.0292 -0.1643)
OKLCHoklch(34.95% 0.167 280.1)
XYZxyz(6.6167, 3.6633, 25.5525)
Luminance0.0366 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31218D #7D8D21
analogous
#21478D #31218D #67218D
triadic
#31218D #8D3121 #218D31
tetradic
#31218D #8D2147 #7D8D21 #218D67
square
#31218D #8D2147 #7D8D21 #218D67
split-complementary
#31218D #8D6721 #478D21
monochromatic
#0F0A2A #20155B #31218D #422DBF #6652D6

Accessibility & contrast

On white

12.12
#31218D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#31218D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31218D
12.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31218D#FFFFFF#000000##FFFFFF
##31218D1.0012.121.7312.12
#FFFFFF12.121.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A90
Deuteranopia (green-blind)
#00328B
Tritanopia (blue-blind)
#004055
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #31218d;
/* rgb */ color: rgb(49, 33, 141);
/* oklch */ color: oklch(34.9% 0.167 280.1);
Tailwind
colors: {
  custom: {
    50: '#765faf',
    500: '#31218d',
    950: '#000000',
  },
}
SCSS
$custom: #31218d;
$custom-light: #765faf;
$custom-dark: #000000;
JSON
{
  "hex": "#31218d",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 141
  },
  "hsl": {
    "h": 248.889,
    "s": 62.069,
    "l": 34.118
  },
  "oklch": {
    "l": 0.3495,
    "c": 0.1669,
    "h": 280.1
  },
  "luminance": 0.03664
}

Semantic roles & 50–950 ramp

primary
#31218D
secondary
#AABA50
accent
#E543CD
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0511
muted
#7C7980

Preview Lab

Preview with #31218D

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

Preview Lab → · Contrast checker → · Palette generator →

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