#312A87#312A87

#312A87 is a dark, vivid blue. Relative luminance 0.041; OKLCH L 35.7% C 0.149 H 279.1°. Best body text is #FFFFFF at 11.59:1 contrast (WCAG AA passes).

Color values

HEX#312A87
RGBrgb(49, 42, 135)
HSLhsl(245, 53%, 35%)
HSVhsv(245, 69%, 53%)
CMYKcmyk(63.7%, 68.9%, 0%, 47.1%)
CIE-LABlab(23.86, 32.30, -51.00)
CIE-LCHlch(23.86, 60.37, 302.35°)
OKLaboklab(35.73% 0.0235 -0.147)
OKLCHoklch(35.73% 0.149 279.1)
XYZxyz(6.4664, 4.0577, 23.3594)
Luminance0.0406 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312A87 #80872A
analogous
#2A5287 #312A87 #602A87
triadic
#312A87 #87312A #2A8731
tetradic
#312A87 #872A52 #80872A #2A8760
square
#312A87 #872A52 #80872A #2A8760
split-complementary
#312A87 #87602A #52872A
monochromatic
#0F0D2A #201B58 #312A87 #4239B6 #675ECD

Accessibility & contrast

On white

11.59
#312A87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#312A87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312A87
11.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312A87#FFFFFF#000000##FFFFFF
##312A871.0011.591.8111.59
#FFFFFF11.591.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8A
Deuteranopia (green-blind)
#003585
Tritanopia (blue-blind)
#004255
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #312a87;
/* rgb */ color: rgb(49, 42, 135);
/* oklch */ color: oklch(35.7% 0.149 279.1);
Tailwind
colors: {
  custom: {
    50: '#7464ab',
    500: '#312a87',
    950: '#000000',
  },
}
SCSS
$custom: #312a87;
$custom-light: #7464ab;
$custom-dark: #000000;
JSON
{
  "hex": "#312a87",
  "rgb": {
    "r": 49,
    "g": 42,
    "b": 135
  },
  "hsl": {
    "h": 244.516,
    "s": 52.542,
    "l": 34.706
  },
  "oklch": {
    "l": 0.35725,
    "c": 0.14887,
    "h": 279.1
  },
  "luminance": 0.04058
}

Semantic roles & 50–950 ramp

primary
#312A87
secondary
#ACB35A
accent
#DC4CD1
background
#F7F6FA
surface
#EDEBF4
border
#C8C6CE
text
#090510
muted
#7B7A7F

Preview Lab

Preview with #312A87

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

Preview Lab → · Contrast checker → · Palette generator →

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