#313AA6#313AA6

#313AA6 is a dark, vivid blue. Relative luminance 0.064; OKLCH L 41.4% C 0.171 H 272.6°. Best body text is #FFFFFF at 9.18:1 contrast (WCAG AA passes).

Color values

HEX#313AA6
RGBrgb(49, 58, 166)
HSLhsl(235, 54%, 42%)
HSVhsv(235, 70%, 65%)
CMYKcmyk(70.5%, 65.1%, 0%, 34.9%)
CIE-LABlab(30.48, 33.01, -59.18)
CIE-LCHlch(30.48, 67.77, 299.15°)
OKLaboklab(41.4% 0.0079 -0.1709)
OKLCHoklch(41.4% 0.171 272.6)
XYZxyz(9.6603, 6.4313, 36.8013)
Luminance0.0643 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#313AA6 #A69D31
analogous
#3174A6 #313AA6 #6331A6
triadic
#313AA6 #A6313A #3AA631
tetradic
#313AA6 #A63174 #A69D31 #31A663
square
#313AA6 #A63174 #A69D31 #31A663
split-complementary
#313AA6 #A66331 #74A631
monochromatic
#151947 #232977 #313AA6 #4A54CA #7A81D8

Accessibility & contrast

On white

9.18
#313AA6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.29
#313AA6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #313AA6
9.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##313AA6#FFFFFF#000000##FFFFFF
##313AA61.009.182.299.18
#FFFFFF9.181.0021.001.00
#0000002.2921.001.0021.00
##FFFFFF9.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DA9
Deuteranopia (green-blind)
#0042A4
Tritanopia (blue-blind)
#00566A
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #313aa6;
/* rgb */ color: rgb(49, 58, 166);
/* oklch */ color: oklch(41.4% 0.171 272.6);
Tailwind
colors: {
  custom: {
    50: '#7970c1',
    500: '#313aa6',
    950: '#000000',
  },
}
SCSS
$custom: #313aa6;
$custom-light: #7970c1;
$custom-dark: #000000;
JSON
{
  "hex": "#313aa6",
  "rgb": {
    "r": 49,
    "g": 58,
    "b": 166
  },
  "hsl": {
    "h": 235.385,
    "s": 54.419,
    "l": 42.157
  },
  "oklch": {
    "l": 0.41399,
    "c": 0.17109,
    "h": 272.6
  },
  "luminance": 0.06432
}

Semantic roles & 50–950 ramp

primary
#313AA6
secondary
#C0BA73
accent
#D24ADE
background
#F8F6FC
surface
#EFECF8
border
#CAC7D1
text
#0A0712
muted
#7C7A81

Preview Lab

Preview with #313AA6

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

Preview Lab → · Contrast checker → · Palette generator →

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