#313F87#313F87

#313F87 is a dark, vivid blue. Relative luminance 0.060; OKLCH L 39.8% C 0.121 H 271.6°. Best body text is #FFFFFF at 9.58:1 contrast (WCAG AA passes).

Color values

HEX#313F87
RGBrgb(49, 63, 135)
HSLhsl(230, 47%, 36%)
HSVhsv(230, 64%, 53%)
CMYKcmyk(63.7%, 53.3%, 0%, 47.1%)
CIE-LABlab(29.30, 18.38, -42.16)
CIE-LCHlch(29.30, 45.99, 293.56°)
OKLaboklab(39.75% 0.0033 -0.1208)
OKLCHoklch(39.75% 0.121 271.6)
XYZxyz(7.4158, 5.9566, 23.6759)
Luminance0.0596 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#313F87 #877931
analogous
#316A87 #313F87 #4E3187
triadic
#313F87 #87313F #3F8731
tetradic
#313F87 #87316A #877931 #31874E
square
#313F87 #87316A #877931 #31874E
split-complementary
#313F87 #874E31 #6A8731
monochromatic
#10152D #212A5A #313F87 #4154B4 #6A79C9

Accessibility & contrast

On white

9.58
#313F87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.19
#313F87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #313F87
9.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##313F87#FFFFFF#000000##FFFFFF
##313F871.009.582.199.58
#FFFFFF9.581.0021.001.00
#0000002.1921.001.0021.00
##FFFFFF9.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#15498A
Deuteranopia (green-blind)
#004186
Tritanopia (blue-blind)
#00505C
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #313f87;
/* rgb */ color: rgb(49, 63, 135);
/* oklch */ color: oklch(39.8% 0.121 271.6);
Tailwind
colors: {
  custom: {
    50: '#7273aa',
    500: '#313f87',
    950: '#000000',
  },
}
SCSS
$custom: #313f87;
$custom-light: #7273aa;
$custom-dark: #000000;
JSON
{
  "hex": "#313f87",
  "rgb": {
    "r": 49,
    "g": 63,
    "b": 135
  },
  "hsl": {
    "h": 230.233,
    "s": 46.739,
    "l": 36.078
  },
  "oklch": {
    "l": 0.3975,
    "c": 0.12088,
    "h": 271.6
  },
  "luminance": 0.05957
}

Semantic roles & 50–950 ramp

primary
#313F87
secondary
#B0A464
accent
#C151D6
background
#F7F7FA
surface
#EDEDF4
border
#C8C8CE
text
#090810
muted
#7B7B7F

Preview Lab

Preview with #313F87

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

Preview Lab → · Contrast checker → · Palette generator →

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