#31319B#31319B

#31319B is a dark, vivid blue. Relative luminance 0.052; OKLCH L 38.8% C 0.167 H 275.3°. Best body text is #FFFFFF at 10.28:1 contrast (WCAG AA passes).

Color values

HEX#31319B
RGBrgb(49, 49, 155)
HSLhsl(240, 52%, 40%)
HSVhsv(240, 68%, 61%)
CMYKcmyk(68.4%, 68.4%, 0%, 39.2%)
CIE-LABlab(27.34, 34.83, -57.66)
CIE-LCHlch(27.34, 67.36, 301.14°)
OKLaboklab(38.81% 0.0155 -0.1665)
OKLCHoklch(38.81% 0.167 275.3)
XYZxyz(8.2794, 5.2154, 31.5743)
Luminance0.0522 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31319B #9B9B31
analogous
#31669B #31319B #66319B
triadic
#31319B #9B3131 #319B31
tetradic
#31319B #9B3166 #9B9B31 #319B66
square
#31319B #9B3166 #9B9B31 #319B66
split-complementary
#31319B #9B6631 #669B31
monochromatic
#14143E #22226D #31319B #4545C4 #7373D3

Accessibility & contrast

On white

10.28
#31319B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.04
#31319B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31319B
10.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31319B#FFFFFF#000000##FFFFFF
##31319B1.0010.282.0410.28
#FFFFFF10.281.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00459E
Deuteranopia (green-blind)
#003C99
Tritanopia (blue-blind)
#004D62
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #31319b;
/* rgb */ color: rgb(49, 49, 155);
/* oklch */ color: oklch(38.8% 0.167 275.3);
Tailwind
colors: {
  custom: {
    50: '#786ab9',
    500: '#31319b',
    950: '#000000',
  },
}
SCSS
$custom: #31319b;
$custom-light: #786ab9;
$custom-dark: #000000;
JSON
{
  "hex": "#31319b",
  "rgb": {
    "r": 49,
    "g": 49,
    "b": 155
  },
  "hsl": {
    "h": 240,
    "s": 51.961,
    "l": 40
  },
  "oklch": {
    "l": 0.3881,
    "c": 0.16719,
    "h": 275.3
  },
  "luminance": 0.05216
}

Semantic roles & 50–950 ramp

primary
#31319B
secondary
#BBBB6D
accent
#DB4CDB
background
#F7F6FB
surface
#EEEBF6
border
#C9C6D0
text
#0A0612
muted
#7C7A81

Preview Lab

Preview with #31319B

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

Preview Lab → · Contrast checker → · Palette generator →

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