#31218F#31218F

#31218F is a dark, vivid blue. Relative luminance 0.037; OKLCH L 35.2% C 0.169 H 279.8°. Best body text is #FFFFFF at 12.04:1 contrast (WCAG AA passes).

Color values

HEX#31218F
RGBrgb(49, 33, 143)
HSLhsl(249, 63%, 35%)
HSVhsv(249, 77%, 56%)
CMYKcmyk(65.7%, 76.9%, 0%, 43.9%)
CIE-LABlab(22.73, 40.27, -57.84)
CIE-LCHlch(22.73, 70.48, 304.85°)
OKLaboklab(35.16% 0.0287 -0.167)
OKLCHoklch(35.16% 0.169 279.8)
XYZxyz(6.7668, 3.7233, 26.3434)
Luminance0.0372 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31218F #7F8F21
analogous
#21488F #31218F #68218F
triadic
#31218F #8F3121 #218F31
tetradic
#31218F #8F2148 #7F8F21 #218F68
square
#31218F #8F2148 #7F8F21 #218F68
split-complementary
#31218F #8F6821 #488F21
monochromatic
#0F0A2C #20165D #31218F #422CC1 #6653D7

Accessibility & contrast

On white

12.04
#31218F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#31218F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31218F
12.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31218F#FFFFFF#000000##FFFFFF
##31218F1.0012.041.7412.04
#FFFFFF12.041.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A92
Deuteranopia (green-blind)
#00328D
Tritanopia (blue-blind)
#004156
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #31218f;
/* rgb */ color: rgb(49, 33, 143);
/* oklch */ color: oklch(35.2% 0.169 279.8);
Tailwind
colors: {
  custom: {
    50: '#765fb1',
    500: '#31218f',
    950: '#000000',
  },
}
SCSS
$custom: #31218f;
$custom-light: #765fb1;
$custom-dark: #000000;
JSON
{
  "hex": "#31218f",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 143
  },
  "hsl": {
    "h": 248.727,
    "s": 62.5,
    "l": 34.51
  },
  "oklch": {
    "l": 0.35161,
    "c": 0.16941,
    "h": 279.8
  },
  "luminance": 0.03724
}

Semantic roles & 50–950 ramp

primary
#31218F
secondary
#ABBB51
accent
#E642CE
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0511
muted
#7C7980

Preview Lab

Preview with #31218F

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

Preview Lab → · Contrast checker → · Palette generator →

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