#313EA5#313EA5

#313EA5 is a dark, vivid blue. Relative luminance 0.068; OKLCH L 42.0% C 0.165 H 271.7°. Best body text is #FFFFFF at 8.89:1 contrast (WCAG AA passes).

Color values

HEX#313EA5
RGBrgb(49, 62, 165)
HSLhsl(233, 54%, 42%)
HSVhsv(233, 70%, 65%)
CMYKcmyk(70.3%, 62.4%, 0%, 35.3%)
CIE-LABlab(31.38, 30.07, -57.11)
CIE-LCHlch(31.38, 64.54, 297.77°)
OKLaboklab(42.04% 0.005 -0.1648)
OKLCHoklch(42.04% 0.165 271.7)
XYZxyz(9.7785, 6.8139, 36.3899)
Luminance0.0682 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#313EA5 #A59831
analogous
#3178A5 #313EA5 #5E31A5
triadic
#313EA5 #A5313E #3EA531
tetradic
#313EA5 #A53178 #A59831 #31A55E
square
#313EA5 #A53178 #A59831 #31A55E
split-complementary
#313EA5 #A55E31 #78A531
monochromatic
#151B47 #232C76 #313EA5 #4A58C9 #7984D7

Accessibility & contrast

On white

8.89
#313EA5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.36
#313EA5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #313EA5
8.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##313EA5#FFFFFF#000000##FFFFFF
##313EA51.008.892.368.89
#FFFFFF8.891.0021.001.00
#0000002.3621.001.0021.00
##FFFFFF8.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004FA8
Deuteranopia (green-blind)
#0045A3
Tritanopia (blue-blind)
#00586B
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #313ea5;
/* rgb */ color: rgb(49, 62, 165);
/* oklch */ color: oklch(42.0% 0.165 271.7);
Tailwind
colors: {
  custom: {
    50: '#7973c1',
    500: '#313ea5',
    950: '#000000',
  },
}
SCSS
$custom: #313ea5;
$custom-light: #7973c1;
$custom-dark: #000000;
JSON
{
  "hex": "#313ea5",
  "rgb": {
    "r": 49,
    "g": 62,
    "b": 165
  },
  "hsl": {
    "h": 233.276,
    "s": 54.206,
    "l": 41.961
  },
  "oklch": {
    "l": 0.42036,
    "c": 0.16485,
    "h": 271.7
  },
  "luminance": 0.06815
}

Semantic roles & 50–950 ramp

primary
#313EA5
secondary
#C0B772
accent
#CD4ADE
background
#F7F6FC
surface
#EEECF8
border
#C9C7D1
text
#0A0812
muted
#7C7B81

Preview Lab

Preview with #313EA5

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

Preview Lab → · Contrast checker → · Palette generator →

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