#313F8A#313F8A

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

Color values

HEX#313F8A
RGBrgb(49, 63, 138)
HSLhsl(231, 48%, 37%)
HSVhsv(231, 64%, 54%)
CMYKcmyk(64.5%, 54.3%, 0%, 45.9%)
CIE-LABlab(29.52, 19.49, -43.67)
CIE-LCHlch(29.52, 47.82, 294.05°)
OKLaboklab(39.98% 0.0036 -0.1253)
OKLCHoklch(39.98% 0.125 271.6)
XYZxyz(7.6300, 6.0423, 24.8040)
Luminance0.0604 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#313F8A #8A7C31
analogous
#316C8A #313F8A #50318A
triadic
#313F8A #8A313F #3F8A31
tetradic
#313F8A #8A316C #8A7C31 #318A50
square
#313F8A #8A316C #8A7C31 #318A50
split-complementary
#313F8A #8A5031 #6C8A31
monochromatic
#111630 #212A5D #313F8A #4154B7 #6B7ACA

Accessibility & contrast

On white

9.51
#313F8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #313F8A
9.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##313F8A#FFFFFF#000000##FFFFFF
##313F8A1.009.512.219.51
#FFFFFF9.511.0021.001.00
#0000002.2121.001.0021.00
##FFFFFF9.511.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #313f8a;
/* rgb */ color: rgb(49, 63, 138);
/* oklch */ color: oklch(40.0% 0.125 271.6);
Tailwind
colors: {
  custom: {
    50: '#7373ad',
    500: '#313f8a',
    950: '#000000',
  },
}
SCSS
$custom: #313f8a;
$custom-light: #7373ad;
$custom-dark: #000000;
JSON
{
  "hex": "#313f8a",
  "rgb": {
    "r": 49,
    "g": 63,
    "b": 138
  },
  "hsl": {
    "h": 230.562,
    "s": 47.594,
    "l": 36.667
  },
  "oklch": {
    "l": 0.39982,
    "c": 0.12532,
    "h": 271.6
  },
  "luminance": 0.06043
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #313F8A

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

Preview Lab → · Contrast checker → · Palette generator →

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