#313F8B#313F8B

#313F8B is a dark, vivid blue. Relative luminance 0.061; OKLCH L 40.1% C 0.127 H 271.6°. Best body text is #FFFFFF at 9.48:1 contrast (WCAG AA passes).

Color values

HEX#313F8B
RGBrgb(49, 63, 139)
HSLhsl(231, 48%, 37%)
HSVhsv(231, 65%, 55%)
CMYKcmyk(64.7%, 54.7%, 0%, 45.5%)
CIE-LABlab(29.59, 19.86, -44.17)
CIE-LCHlch(29.59, 48.43, 294.21°)
OKLaboklab(40.06% 0.0036 -0.1267)
OKLCHoklch(40.06% 0.127 271.6)
XYZxyz(7.7028, 6.0714, 25.1871)
Luminance0.0607 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#313F8B #8B7D31
analogous
#316C8B #313F8B #50318B
triadic
#313F8B #8B313F #3F8B31
tetradic
#313F8B #8B316C #8B7D31 #318B50
square
#313F8B #8B316C #8B7D31 #318B50
split-complementary
#313F8B #8B5031 #6C8B31
monochromatic
#111631 #212A5E #313F8B #4154B8 #6B7ACB

Accessibility & contrast

On white

9.48
#313F8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.21
#313F8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #313F8B
9.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##313F8B#FFFFFF#000000##FFFFFF
##313F8B1.009.482.219.48
#FFFFFF9.481.0021.001.00
#0000002.2121.001.0021.00
##FFFFFF9.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0D4A8E
Deuteranopia (green-blind)
#004289
Tritanopia (blue-blind)
#00515E
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #313f8b;
/* rgb */ color: rgb(49, 63, 139);
/* oklch */ color: oklch(40.1% 0.127 271.6);
Tailwind
colors: {
  custom: {
    50: '#7373ad',
    500: '#313f8b',
    950: '#000000',
  },
}
SCSS
$custom: #313f8b;
$custom-light: #7373ad;
$custom-dark: #000000;
JSON
{
  "hex": "#313f8b",
  "rgb": {
    "r": 49,
    "g": 63,
    "b": 139
  },
  "hsl": {
    "h": 230.667,
    "s": 47.872,
    "l": 36.863
  },
  "oklch": {
    "l": 0.4006,
    "c": 0.12679,
    "h": 271.6
  },
  "luminance": 0.06072
}

Semantic roles & 50–950 ramp

primary
#313F8B
secondary
#B2A665
accent
#C250D7
background
#F7F7FA
surface
#EDEDF4
border
#C8C8CE
text
#090810
muted
#7B7B7F

Preview Lab

Preview with #313F8B

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

Preview Lab → · Contrast checker → · Palette generator →

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