#312D97#312D97

#312D97 is a dark, vivid blue. Relative luminance 0.048; OKLCH L 37.8% C 0.167 H 276.5°. Best body text is #FFFFFF at 10.75:1 contrast (WCAG AA passes).

Color values

HEX#312D97
RGBrgb(49, 45, 151)
HSLhsl(242, 54%, 38%)
HSVhsv(242, 70%, 59%)
CMYKcmyk(67.5%, 70.2%, 0%, 40.8%)
CIE-LABlab(26.05, 35.93, -57.33)
CIE-LCHlch(26.05, 67.65, 302.08°)
OKLaboklab(37.76% 0.0189 -0.1655)
OKLCHoklch(37.76% 0.167 276.5)
XYZxyz(7.7891, 4.7634, 29.7811)
Luminance0.0476 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312D97 #93972D
analogous
#2D5E97 #312D97 #662D97
triadic
#312D97 #97312D #2D9731
tetradic
#312D97 #972D5E #93972D #2D9766
square
#312D97 #972D5E #93972D #2D9766
split-complementary
#312D97 #97662D #5E972D
monochromatic
#121139 #221F68 #312D97 #413CC5 #6F6BD3

Accessibility & contrast

On white

10.75
#312D97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#312D97 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312D97
10.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312D97#FFFFFF#000000##FFFFFF
##312D971.0010.751.9510.75
#FFFFFF10.751.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00429A
Deuteranopia (green-blind)
#003995
Tritanopia (blue-blind)
#004A5E
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #312d97;
/* rgb */ color: rgb(49, 45, 151);
/* oklch */ color: oklch(37.8% 0.167 276.5);
Tailwind
colors: {
  custom: {
    50: '#7767b7',
    500: '#312d97',
    950: '#000000',
  },
}
SCSS
$custom: #312d97;
$custom-light: #7767b7;
$custom-dark: #000000;
JSON
{
  "hex": "#312d97",
  "rgb": {
    "r": 49,
    "g": 45,
    "b": 151
  },
  "hsl": {
    "h": 242.264,
    "s": 54.082,
    "l": 38.431
  },
  "oklch": {
    "l": 0.37764,
    "c": 0.16658,
    "h": 276.5
  },
  "luminance": 0.04764
}

Semantic roles & 50–950 ramp

primary
#312D97
secondary
#B7BA66
accent
#DD4AD8
background
#F7F6FB
surface
#EEEBF6
border
#C9C6D0
text
#0A0611
muted
#7C7A80

Preview Lab

Preview with #312D97

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

Preview Lab → · Contrast checker → · Palette generator →

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