#31317B#31317B

#31317B is a dark, vivid blue. Relative luminance 0.043; OKLCH L 35.9% C 0.123 H 278.3°. Best body text is #FFFFFF at 11.31:1 contrast (WCAG AA passes).

Color values

HEX#31317B
RGBrgb(49, 49, 123)
HSLhsl(240, 43%, 34%)
HSVhsv(240, 60%, 48%)
CMYKcmyk(60.2%, 60.2%, 0%, 51.8%)
CIE-LABlab(24.57, 23.52, -42.29)
CIE-LCHlch(24.57, 48.39, 299.08°)
OKLaboklab(35.93% 0.0176 -0.1214)
OKLCHoklch(35.93% 0.123 278.3)
XYZxyz(5.9389, 4.2792, 19.2481)
Luminance0.0428 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31317B #7B7B31
analogous
#31567B #31317B #56317B
triadic
#31317B #7B3131 #317B31
tetradic
#31317B #7B3156 #7B7B31 #317B56
square
#31317B #7B3156 #7B7B31 #317B56
split-complementary
#31317B #7B5631 #567B31
monochromatic
#0E0E23 #20204F #31317B #4242A7 #6565C2

Accessibility & contrast

On white

11.31
#31317B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.86
#31317B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31317B
11.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31317B#FFFFFF#000000##FFFFFF
##31317B1.0011.311.8611.31
#FFFFFF11.311.0021.001.00
#0000001.8621.001.0021.00
##FFFFFF11.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D7D
Deuteranopia (green-blind)
#003779
Tritanopia (blue-blind)
#034351
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #31317b;
/* rgb */ color: rgb(49, 49, 123);
/* oklch */ color: oklch(35.9% 0.123 278.3);
Tailwind
colors: {
  custom: {
    50: '#7169a2',
    500: '#31317b',
    950: '#000000',
  },
}
SCSS
$custom: #31317b;
$custom-light: #7169a2;
$custom-dark: #000000;
JSON
{
  "hex": "#31317b",
  "rgb": {
    "r": 49,
    "g": 49,
    "b": 123
  },
  "hsl": {
    "h": 240,
    "s": 43.023,
    "l": 33.725
  },
  "oklch": {
    "l": 0.35926,
    "c": 0.12265,
    "h": 278.3
  },
  "luminance": 0.0428
}

Semantic roles & 50–950 ramp

primary
#31317B
secondary
#A9A95F
accent
#D355D3
background
#F7F6FA
surface
#EDEBF3
border
#C8C6CD
text
#08060F
muted
#7B7A7F

Preview Lab

Preview with #31317B

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

Preview Lab → · Contrast checker → · Palette generator →

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