#31228B#31228B

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

Color values

HEX#31228B
RGBrgb(49, 34, 139)
HSLhsl(249, 61%, 34%)
HSVhsv(249, 76%, 55%)
CMYKcmyk(64.7%, 75.5%, 0%, 45.5%)
CIE-LABlab(22.52, 38.42, -55.71)
CIE-LCHlch(22.52, 67.68, 304.60°)
OKLaboklab(34.88% 0.029 -0.1607)
OKLCHoklch(34.88% 0.163 280.2)
XYZxyz(6.4974, 3.6606, 24.7853)
Luminance0.0366 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31228B #7C8B22
analogous
#22488B #31228B #66228B
triadic
#31228B #8B3122 #228B31
tetradic
#31228B #8B2248 #7C8B22 #228B66
square
#31228B #8B2248 #7C8B22 #228B66
split-complementary
#31228B #8B6622 #488B22
monochromatic
#0E0A29 #20165A #31228B #422EBC #6553D5

Accessibility & contrast

On white

12.12
#31228B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#31228B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31228B
12.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31228B#FFFFFF#000000##FFFFFF
##31228B1.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)
#003A8E
Deuteranopia (green-blind)
#003289
Tritanopia (blue-blind)
#004054
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #31228b;
/* rgb */ color: rgb(49, 34, 139);
/* oklch */ color: oklch(34.9% 0.163 280.2);
Tailwind
colors: {
  custom: {
    50: '#765fae',
    500: '#31228b',
    950: '#000000',
  },
}
SCSS
$custom: #31228b;
$custom-light: #765fae;
$custom-dark: #000000;
JSON
{
  "hex": "#31228b",
  "rgb": {
    "r": 49,
    "g": 34,
    "b": 139
  },
  "hsl": {
    "h": 248.571,
    "s": 60.694,
    "l": 33.922
  },
  "oklch": {
    "l": 0.34881,
    "c": 0.16334,
    "h": 280.2
  },
  "luminance": 0.03661
}

Semantic roles & 50–950 ramp

primary
#31228B
secondary
#AAB850
accent
#E444CD
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090510
muted
#7B797F

Preview Lab

Preview with #31228B

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

Preview Lab → · Contrast checker → · Palette generator →

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