#313AA4#313AA4

#313AA4 is a dark, vivid blue. Relative luminance 0.064; OKLCH L 41.2% C 0.168 H 272.7°. Best body text is #FFFFFF at 9.24:1 contrast (WCAG AA passes).

Color values

HEX#313AA4
RGBrgb(49, 58, 164)
HSLhsl(235, 54%, 42%)
HSVhsv(235, 70%, 64%)
CMYKcmyk(70.1%, 64.6%, 0%, 35.7%)
CIE-LABlab(30.30, 32.30, -58.27)
CIE-LCHlch(30.30, 66.62, 299.00°)
OKLaboklab(41.22% 0.008 -0.1682)
OKLCHoklch(41.22% 0.168 272.7)
XYZxyz(9.4783, 6.3585, 35.8426)
Luminance0.0636 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#313AA4 #A49B31
analogous
#3174A4 #313AA4 #6131A4
triadic
#313AA4 #A4313A #3AA431
tetradic
#313AA4 #A43174 #A49B31 #31A461
square
#313AA4 #A43174 #A49B31 #31A461
split-complementary
#313AA4 #A46131 #74A431
monochromatic
#151946 #232975 #313AA4 #4953C9 #7980D7

Accessibility & contrast

On white

9.24
#313AA4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.27
#313AA4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #313AA4
9.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##313AA4#FFFFFF#000000##FFFFFF
##313AA41.009.242.279.24
#FFFFFF9.241.0021.001.00
#0000002.2721.001.0021.00
##FFFFFF9.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DA7
Deuteranopia (green-blind)
#0042A2
Tritanopia (blue-blind)
#005569
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #313aa4;
/* rgb */ color: rgb(49, 58, 164);
/* oklch */ color: oklch(41.2% 0.168 272.7);
Tailwind
colors: {
  custom: {
    50: '#7970c0',
    500: '#313aa4',
    950: '#000000',
  },
}
SCSS
$custom: #313aa4;
$custom-light: #7970c0;
$custom-dark: #000000;
JSON
{
  "hex": "#313aa4",
  "rgb": {
    "r": 49,
    "g": 58,
    "b": 164
  },
  "hsl": {
    "h": 235.304,
    "s": 53.991,
    "l": 41.765
  },
  "oklch": {
    "l": 0.41216,
    "c": 0.16842,
    "h": 272.7
  },
  "luminance": 0.06359
}

Semantic roles & 50–950 ramp

primary
#313AA4
secondary
#BFB972
accent
#D24ADD
background
#F7F6FB
surface
#EEECF7
border
#C9C7D0
text
#0A0712
muted
#7C7A81

Preview Lab

Preview with #313AA4

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

Preview Lab → · Contrast checker → · Palette generator →

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