#312D9D#312D9D

#312D9D is a dark, vivid blue. Relative luminance 0.050; OKLCH L 38.4% C 0.174 H 275.9°. Best body text is #FFFFFF at 10.54:1 contrast (WCAG AA passes).

Color values

HEX#312D9D
RGBrgb(49, 45, 157)
HSLhsl(242, 55%, 40%)
HSVhsv(242, 71%, 62%)
CMYKcmyk(68.8%, 71.3%, 0%, 38.4%)
CIE-LABlab(26.63, 37.98, -60.04)
CIE-LCHlch(26.63, 71.04, 302.31°)
OKLaboklab(38.36% 0.018 -0.1734)
OKLCHoklch(38.36% 0.174 275.9)
XYZxyz(8.2888, 4.9633, 32.4130)
Luminance0.0496 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312D9D #999D2D
analogous
#2D619D #312D9D #692D9D
triadic
#312D9D #9D312D #2D9D31
tetradic
#312D9D #9D2D61 #999D2D #2D9D69
square
#312D9D #9D2D61 #999D2D #2D9D69
split-complementary
#312D9D #9D692D #619D2D
monochromatic
#13123E #221F6D #312D9D #443FC8 #726FD6

Accessibility & contrast

On white

10.54
#312D9D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.99
#312D9D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312D9D
10.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312D9D#FFFFFF#000000##FFFFFF
##312D9D1.0010.541.9910.54
#FFFFFF10.541.0021.001.00
#0000001.9921.001.0021.00
##FFFFFF10.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0044A0
Deuteranopia (green-blind)
#003A9B
Tritanopia (blue-blind)
#004C61
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #312d9d;
/* rgb */ color: rgb(49, 45, 157);
/* oklch */ color: oklch(38.4% 0.174 275.9);
Tailwind
colors: {
  custom: {
    50: '#7867bb',
    500: '#312d9d',
    950: '#000000',
  },
}
SCSS
$custom: #312d9d;
$custom-light: #7867bb;
$custom-dark: #000000;
JSON
{
  "hex": "#312d9d",
  "rgb": {
    "r": 49,
    "g": 45,
    "b": 157
  },
  "hsl": {
    "h": 242.143,
    "s": 55.446,
    "l": 39.608
  },
  "oklch": {
    "l": 0.38357,
    "c": 0.17438,
    "h": 275.9
  },
  "luminance": 0.04964
}

Semantic roles & 50–950 ramp

primary
#312D9D
secondary
#BABD69
accent
#DF49D9
background
#F7F6FB
surface
#EEEBF6
border
#C9C6D0
text
#0A0612
muted
#7C7A81

Preview Lab

Preview with #312D9D

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

Preview Lab → · Contrast checker → · Palette generator →

#312D9D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva