#313D87#313D87

#313D87 is a dark, vivid blue. Relative luminance 0.057; OKLCH L 39.3% C 0.124 H 272.5°. Best body text is #FFFFFF at 9.78:1 contrast (WCAG AA passes).

Color values

HEX#313D87
RGBrgb(49, 61, 135)
HSLhsl(232, 47%, 36%)
HSVhsv(232, 64%, 53%)
CMYKcmyk(63.7%, 54.8%, 0%, 47.1%)
CIE-LABlab(28.74, 19.74, -43.06)
CIE-LCHlch(28.74, 47.37, 294.63°)
OKLaboklab(39.33% 0.0054 -0.1235)
OKLCHoklch(39.33% 0.124 272.5)
XYZxyz(7.3071, 5.7391, 23.6397)
Luminance0.0574 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#313D87 #877B31
analogous
#316887 #313D87 #503187
triadic
#313D87 #87313D #3D8731
tetradic
#313D87 #873168 #877B31 #318750
square
#313D87 #873168 #877B31 #318750
split-complementary
#313D87 #875031 #688731
monochromatic
#10142D #21295A #313D87 #4151B4 #6A77C9

Accessibility & contrast

On white

9.78
#313D87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.15
#313D87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #313D87
9.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##313D87#FFFFFF#000000##FFFFFF
##313D871.009.782.159.78
#FFFFFF9.781.0021.001.00
#0000002.1521.001.0021.00
##FFFFFF9.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0D488A
Deuteranopia (green-blind)
#004085
Tritanopia (blue-blind)
#004E5C
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #313d87;
/* rgb */ color: rgb(49, 61, 135);
/* oklch */ color: oklch(39.3% 0.124 272.5);
Tailwind
colors: {
  custom: {
    50: '#7272aa',
    500: '#313d87',
    950: '#000000',
  },
}
SCSS
$custom: #313d87;
$custom-light: #7272aa;
$custom-dark: #000000;
JSON
{
  "hex": "#313d87",
  "rgb": {
    "r": 49,
    "g": 61,
    "b": 135
  },
  "hsl": {
    "h": 231.628,
    "s": 46.739,
    "l": 36.078
  },
  "oklch": {
    "l": 0.39329,
    "c": 0.12363,
    "h": 272.5
  },
  "luminance": 0.0574
}

Semantic roles & 50–950 ramp

primary
#313D87
secondary
#B0A664
accent
#C451D6
background
#F7F6FA
surface
#EDECF4
border
#C8C7CE
text
#090710
muted
#7B7A7F

Preview Lab

Preview with #313D87

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

Preview Lab → · Contrast checker → · Palette generator →

#313D87 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva