#31228D#31228D

#31228D is a dark, vivid blue. Relative luminance 0.037; OKLCH L 35.1% C 0.166 H 279.9°. Best body text is #FFFFFF at 12.04:1 contrast (WCAG AA passes).

Color values

HEX#31228D
RGBrgb(49, 34, 141)
HSLhsl(248, 61%, 34%)
HSVhsv(248, 76%, 55%)
CMYKcmyk(65.2%, 75.9%, 0%, 44.7%)
CIE-LABlab(22.72, 39.07, -56.62)
CIE-LCHlch(22.72, 68.79, 304.61°)
OKLaboklab(35.09% 0.0285 -0.1634)
OKLCHoklch(35.09% 0.166 279.9)
XYZxyz(6.6448, 3.7196, 25.5619)
Luminance0.0372 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31228D #7E8D22
analogous
#22498D #31228D #67228D
triadic
#31228D #8D3122 #228D31
tetradic
#31228D #8D2249 #7E8D22 #228D67
square
#31228D #8D2249 #7E8D22 #228D67
split-complementary
#31228D #8D6722 #498D22
monochromatic
#0F0A2A #20165C #31228D #422EBE #6654D6

Accessibility & contrast

On white

12.04
#31228D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#31228D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31228D
12.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31228D#FFFFFF#000000##FFFFFF
##31228D1.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)
#003A90
Deuteranopia (green-blind)
#00328B
Tritanopia (blue-blind)
#004056
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #31228d;
/* rgb */ color: rgb(49, 34, 141);
/* oklch */ color: oklch(35.1% 0.166 279.9);
Tailwind
colors: {
  custom: {
    50: '#765faf',
    500: '#31228d',
    950: '#000000',
  },
}
SCSS
$custom: #31228d;
$custom-light: #765faf;
$custom-dark: #000000;
JSON
{
  "hex": "#31228d",
  "rgb": {
    "r": 49,
    "g": 34,
    "b": 141
  },
  "hsl": {
    "h": 248.411,
    "s": 61.143,
    "l": 34.314
  },
  "oklch": {
    "l": 0.35089,
    "c": 0.16587,
    "h": 279.9
  },
  "luminance": 0.0372
}

Semantic roles & 50–950 ramp

primary
#31228D
secondary
#ABB951
accent
#E444CE
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0511
muted
#7C7980

Preview Lab

Preview with #31228D

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

Preview Lab → · Contrast checker → · Palette generator →

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