#313158#313158

#313158 is a dark, moderate blue. Relative luminance 0.036; OKLCH L 33.3% C 0.068 H 282.1°. Best body text is #FFFFFF at 12.27:1 contrast (WCAG AA passes).

Color values

HEX#313158
RGBrgb(49, 49, 88)
HSLhsl(240, 28%, 27%)
HSVhsv(240, 44%, 35%)
CMYKcmyk(44.3%, 44.3%, 0%, 65.5%)
CIE-LABlab(22.14, 11.33, -23.57)
CIE-LCHlch(22.14, 26.15, 295.68°)
OKLaboklab(33.32% 0.0142 -0.0664)
OKLCHoklch(33.32% 0.068 282.1)
XYZxyz(4.1259, 3.5540, 9.6992)
Luminance0.0355 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#313158 #585831
analogous
#314558 #313158 #453158
triadic
#313158 #583131 #315831
tetradic
#313158 #583145 #585831 #315845
square
#313158 #583145 #585831 #315845
split-complementary
#313158 #584531 #455831
monochromatic
#0B0B14 #1B1B31 #313158 #47477F #5E5EA5

Accessibility & contrast

On white

12.27
#313158 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.71
#313158 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #313158
12.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##313158#FFFFFF#000000##FFFFFF
##3131581.0012.271.7112.27
#FFFFFF12.271.0021.001.00
#0000001.7121.001.0021.00
##FFFFFF12.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#233659
Deuteranopia (green-blind)
#213457
Tritanopia (blue-blind)
#253940
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #313158;
/* rgb */ color: rgb(49, 49, 88);
/* oklch */ color: oklch(33.3% 0.068 282.1);
Tailwind
colors: {
  custom: {
    50: '#6b6987',
    500: '#313158',
    950: '#000000',
  },
}
SCSS
$custom: #313158;
$custom-light: #6b6987;
$custom-dark: #000000;
JSON
{
  "hex": "#313158",
  "rgb": {
    "r": 49,
    "g": 49,
    "b": 88
  },
  "hsl": {
    "h": 240,
    "s": 28.467,
    "l": 26.863
  },
  "oklch": {
    "l": 0.33315,
    "c": 0.0679,
    "h": 282.1
  },
  "luminance": 0.03554
}

Semantic roles & 50–950 ramp

primary
#313158
secondary
#89895C
accent
#C563C5
background
#F6F6F8
surface
#EBEBEF
border
#C6C6CA
text
#07060B
muted
#7A7A7C

Preview Lab

Preview with #313158

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

Preview Lab → · Contrast checker → · Palette generator →

#313158 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva