#31218C#31218C

#31218C is a dark, vivid blue. Relative luminance 0.036; OKLCH L 34.8% C 0.166 H 280.2°. Best body text is #FFFFFF at 12.16:1 contrast (WCAG AA passes).

Color values

HEX#31218C
RGBrgb(49, 33, 140)
HSLhsl(249, 62%, 34%)
HSVhsv(249, 76%, 55%)
CMYKcmyk(65%, 76.4%, 0%, 45.1%)
CIE-LABlab(22.42, 39.31, -56.49)
CIE-LCHlch(22.42, 68.82, 304.83°)
OKLaboklab(34.85% 0.0294 -0.163)
OKLCHoklch(34.85% 0.166 280.2)
XYZxyz(6.5426, 3.6336, 25.1624)
Luminance0.0363 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31218C #7C8C21
analogous
#21478C #31218C #67218C
triadic
#31218C #8C3121 #218C31
tetradic
#31218C #8C2147 #7C8C21 #218C67
square
#31218C #8C2147 #7C8C21 #218C67
split-complementary
#31218C #8C6721 #478C21
monochromatic
#0E0A29 #20155A #31218C #422DBE #6551D6

Accessibility & contrast

On white

12.16
#31218C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31218C
12.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31218C#FFFFFF#000000##FFFFFF
##31218C1.0012.161.7312.16
#FFFFFF12.161.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398F
Deuteranopia (green-blind)
#00318A
Tritanopia (blue-blind)
#003F55
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #31218c;
/* rgb */ color: rgb(49, 33, 140);
/* oklch */ color: oklch(34.8% 0.166 280.2);
Tailwind
colors: {
  custom: {
    50: '#765faf',
    500: '#31218c',
    950: '#000000',
  },
}
SCSS
$custom: #31218c;
$custom-light: #765faf;
$custom-dark: #000000;
JSON
{
  "hex": "#31218c",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 140
  },
  "hsl": {
    "h": 248.972,
    "s": 61.85,
    "l": 33.922
  },
  "oklch": {
    "l": 0.34845,
    "c": 0.16566,
    "h": 280.2
  },
  "luminance": 0.03634
}

Semantic roles & 50–950 ramp

primary
#31218C
secondary
#AAB94F
accent
#E543CD
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #31218C

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

Preview Lab → · Contrast checker → · Palette generator →

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