#312B71#312B71

#312B71 is a dark, moderate blue. Relative luminance 0.036; OKLCH L 33.9% C 0.117 H 282.1°. Best body text is #FFFFFF at 12.25:1 contrast (WCAG AA passes).

Color values

HEX#312B71
RGBrgb(49, 43, 113)
HSLhsl(245, 45%, 31%)
HSVhsv(245, 62%, 44%)
CMYKcmyk(56.6%, 61.9%, 0%, 55.7%)
CIE-LABlab(22.21, 24.04, -39.76)
CIE-LCHlch(22.21, 46.46, 301.16°)
OKLaboklab(33.92% 0.0244 -0.114)
OKLCHoklch(33.92% 0.117 282.1)
XYZxyz(5.1102, 3.5727, 16.0399)
Luminance0.0357 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312B71 #6B712B
analogous
#2B4871 #312B71 #542B71
triadic
#312B71 #71312B #2B7131
tetradic
#312B71 #712B48 #6B712B #2B7154
square
#312B71 #712B48 #6B712B #2B7154
split-complementary
#312B71 #71542B #48712B
monochromatic
#0B0918 #1E1A45 #312B71 #443C9D #6057BF

Accessibility & contrast

On white

12.25
#312B71 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.71
#312B71 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312B71
12.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312B71#FFFFFF#000000##FFFFFF
##312B711.0012.251.7112.25
#FFFFFF12.251.0021.001.00
#0000001.7121.001.0021.00
##FFFFFF12.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003873
Deuteranopia (green-blind)
#003370
Tritanopia (blue-blind)
#143B49
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #312b71;
/* rgb */ color: rgb(49, 43, 113);
/* oklch */ color: oklch(33.9% 0.117 282.1);
Tailwind
colors: {
  custom: {
    50: '#70649a',
    500: '#312b71',
    950: '#000000',
  },
}
SCSS
$custom: #312b71;
$custom-light: #70649a;
$custom-dark: #000000;
JSON
{
  "hex": "#312b71",
  "rgb": {
    "r": 49,
    "g": 43,
    "b": 113
  },
  "hsl": {
    "h": 245.143,
    "s": 44.872,
    "l": 30.588
  },
  "oklch": {
    "l": 0.33924,
    "c": 0.11654,
    "h": 282.1
  },
  "luminance": 0.03573
}

Semantic roles & 50–950 ramp

primary
#312B71
secondary
#9CA355
accent
#D553C9
background
#F7F6F9
surface
#EDEBF2
border
#C8C6CC
text
#08050E
muted
#7B7A7E

Preview Lab

Preview with #312B71

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

Preview Lab → · Contrast checker → · Palette generator →

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