#313F78#313F78

#313F78 is a dark, moderate blue. Relative luminance 0.056; OKLCH L 38.6% C 0.098 H 270.8°. Best body text is #FFFFFF at 9.94:1 contrast (WCAG AA passes).

Color values

HEX#313F78
RGBrgb(49, 63, 120)
HSLhsl(228, 42%, 33%)
HSVhsv(228, 59%, 47%)
CMYKcmyk(59.2%, 47.5%, 0%, 52.9%)
CIE-LABlab(28.28, 12.89, -34.42)
CIE-LCHlch(28.28, 36.76, 290.53°)
OKLaboklab(38.65% 0.0014 -0.0981)
OKLCHoklch(38.65% 0.098 270.8)
XYZxyz(6.4332, 5.5636, 18.5005)
Luminance0.0556 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#313F78 #786A31
analogous
#316278 #313F78 #463178
triadic
#313F78 #78313F #3F7831
tetradic
#313F78 #783162 #786A31 #317846
square
#313F78 #783162 #786A31 #317846
split-complementary
#313F78 #784631 #627831
monochromatic
#0E1121 #1F284D #313F78 #4356A3 #6476C0

Accessibility & contrast

On white

9.94
#313F78 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.11
#313F78 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #313F78
9.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##313F78#FFFFFF#000000##FFFFFF
##313F781.009.942.119.94
#FFFFFF9.941.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#25467A
Deuteranopia (green-blind)
#1B4077
Tritanopia (blue-blind)
#044C55
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #313f78;
/* rgb */ color: rgb(49, 63, 120);
/* oklch */ color: oklch(38.6% 0.098 270.8);
Tailwind
colors: {
  custom: {
    50: '#6f739f',
    500: '#313f78',
    950: '#000000',
  },
}
SCSS
$custom: #313f78;
$custom-light: #6f739f;
$custom-dark: #000000;
JSON
{
  "hex": "#313f78",
  "rgb": {
    "r": 49,
    "g": 63,
    "b": 120
  },
  "hsl": {
    "h": 228.169,
    "s": 42.012,
    "l": 33.137
  },
  "oklch": {
    "l": 0.38649,
    "c": 0.0981,
    "h": 270.8
  },
  "luminance": 0.05564
}

Semantic roles & 50–950 ramp

primary
#313F78
secondary
#A7995E
accent
#B956D2
background
#F7F6F9
surface
#EDECF2
border
#C8C7CC
text
#08080E
muted
#7B7B7E

Preview Lab

Preview with #313F78

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

Preview Lab → · Contrast checker → · Palette generator →

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