#31218A#31218A

#31218A is a dark, vivid blue. Relative luminance 0.036; OKLCH L 34.6% C 0.163 H 280.6°. Best body text is #FFFFFF at 12.24:1 contrast (WCAG AA passes).

Color values

HEX#31218A
RGBrgb(49, 33, 138)
HSLhsl(249, 61%, 34%)
HSVhsv(249, 76%, 54%)
CMYKcmyk(64.5%, 76.1%, 0%, 45.9%)
CIE-LABlab(22.21, 38.66, -55.58)
CIE-LCHlch(22.21, 67.71, 304.82°)
OKLaboklab(34.64% 0.0299 -0.1604)
OKLCHoklch(34.64% 0.163 280.6)
XYZxyz(6.3965, 3.5752, 24.3928)
Luminance0.0358 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31218A #7A8A21
analogous
#21458A #31218A #65218A
triadic
#31218A #8A3121 #218A31
tetradic
#31218A #8A2145 #7A8A21 #218A65
square
#31218A #8A2145 #7A8A21 #218A65
split-complementary
#31218A #8A6521 #458A21
monochromatic
#0E0927 #1F1559 #31218A #432DBB #6450D5

Accessibility & contrast

On white

12.24
#31218A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31218A
12.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31218A#FFFFFF#000000##FFFFFF
##31218A1.0012.241.7212.24
#FFFFFF12.241.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.241.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #31218a;
/* rgb */ color: rgb(49, 33, 138);
/* oklch */ color: oklch(34.6% 0.163 280.6);
Tailwind
colors: {
  custom: {
    50: '#755fad',
    500: '#31218a',
    950: '#000000',
  },
}
SCSS
$custom: #31218a;
$custom-light: #755fad;
$custom-dark: #000000;
JSON
{
  "hex": "#31218a",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 138
  },
  "hsl": {
    "h": 249.143,
    "s": 61.404,
    "l": 33.529
  },
  "oklch": {
    "l": 0.34637,
    "c": 0.16314,
    "h": 280.6
  },
  "luminance": 0.03576
}

Semantic roles & 50–950 ramp

primary
#31218A
secondary
#A8B94E
accent
#E543CC
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #31218A

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

Preview Lab → · Contrast checker → · Palette generator →

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