#313C78#313C78

#313C78 is a dark, moderate blue. Relative luminance 0.052; OKLCH L 38.0% C 0.102 H 272.8°. Best body text is #FFFFFF at 10.25:1 contrast (WCAG AA passes).

Color values

HEX#313C78
RGBrgb(49, 60, 120)
HSLhsl(231, 42%, 33%)
HSVhsv(231, 59%, 47%)
CMYKcmyk(59.2%, 50%, 0%, 52.9%)
CIE-LABlab(27.41, 14.94, -35.82)
CIE-LCHlch(27.41, 38.81, 292.64°)
OKLaboklab(37.98% 0.005 -0.1022)
OKLCHoklch(37.98% 0.102 272.8)
XYZxyz(6.2715, 5.2403, 18.4466)
Luminance0.0524 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#313C78 #786D31
analogous
#315F78 #313C78 #493178
triadic
#313C78 #78313C #3C7831
tetradic
#313C78 #78315F #786D31 #317849
square
#313C78 #78315F #786D31 #317849
split-complementary
#313C78 #784931 #5F7831
monochromatic
#0E1121 #1F264D #313C78 #4352A3 #6472C0

Accessibility & contrast

On white

10.25
#313C78 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#313C78 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #313C78
10.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##313C78#FFFFFF#000000##FFFFFF
##313C781.0010.252.0510.25
#FFFFFF10.251.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1F447A
Deuteranopia (green-blind)
#153E77
Tritanopia (blue-blind)
#054954
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #313c78;
/* rgb */ color: rgb(49, 60, 120);
/* oklch */ color: oklch(38.0% 0.102 272.8);
Tailwind
colors: {
  custom: {
    50: '#70719f',
    500: '#313c78',
    950: '#000000',
  },
}
SCSS
$custom: #313c78;
$custom-light: #70719f;
$custom-dark: #000000;
JSON
{
  "hex": "#313c78",
  "rgb": {
    "r": 49,
    "g": 60,
    "b": 120
  },
  "hsl": {
    "h": 230.704,
    "s": 42.012,
    "l": 33.137
  },
  "oklch": {
    "l": 0.37983,
    "c": 0.10236,
    "h": 272.8
  },
  "luminance": 0.05241
}

Semantic roles & 50–950 ramp

primary
#313C78
secondary
#A79C5E
accent
#BF56D2
background
#F7F6F9
surface
#EDECF2
border
#C8C7CC
text
#08070E
muted
#7B7A7E

Preview Lab

Preview with #313C78

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

Preview Lab → · Contrast checker → · Palette generator →

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