#31319C#31319C

#31319C is a dark, vivid blue. Relative luminance 0.052; OKLCH L 38.9% C 0.169 H 275.2°. Best body text is #FFFFFF at 10.24:1 contrast (WCAG AA passes).

Color values

HEX#31319C
RGBrgb(49, 49, 156)
HSLhsl(240, 52%, 40%)
HSVhsv(240, 69%, 61%)
CMYKcmyk(68.6%, 68.6%, 0%, 38.8%)
CIE-LABlab(27.43, 35.18, -58.11)
CIE-LCHlch(27.43, 67.93, 301.19°)
OKLaboklab(38.91% 0.0153 -0.1678)
OKLCHoklch(38.91% 0.169 275.2)
XYZxyz(8.3637, 5.2491, 32.0185)
Luminance0.0525 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31319C #9C9C31
analogous
#31669C #31319C #66319C
triadic
#31319C #9C3131 #319C31
tetradic
#31319C #9C3166 #9C9C31 #319C66
square
#31319C #9C3166 #9C9C31 #319C66
split-complementary
#31319C #9C6631 #669C31
monochromatic
#14143F #22226D #31319C #4545C5 #7474D3

Accessibility & contrast

On white

10.24
#31319C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#31319C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31319C
10.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31319C#FFFFFF#000000##FFFFFF
##31319C1.0010.242.0510.24
#FFFFFF10.241.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00469F
Deuteranopia (green-blind)
#003C9A
Tritanopia (blue-blind)
#004E62
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #31319c;
/* rgb */ color: rgb(49, 49, 156);
/* oklch */ color: oklch(38.9% 0.169 275.2);
Tailwind
colors: {
  custom: {
    50: '#786aba',
    500: '#31319c',
    950: '#000000',
  },
}
SCSS
$custom: #31319c;
$custom-light: #786aba;
$custom-dark: #000000;
JSON
{
  "hex": "#31319c",
  "rgb": {
    "r": 49,
    "g": 49,
    "b": 156
  },
  "hsl": {
    "h": 240,
    "s": 52.195,
    "l": 40.196
  },
  "oklch": {
    "l": 0.38906,
    "c": 0.16851,
    "h": 275.2
  },
  "luminance": 0.0525
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #31319C

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

Preview Lab → · Contrast checker → · Palette generator →

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