#312797#312797

#312797 is a dark, vivid blue. Relative luminance 0.043; OKLCH L 36.8% C 0.173 H 277.6°. Best body text is #FFFFFF at 11.24:1 contrast (WCAG AA passes).

Color values

HEX#312797
RGBrgb(49, 39, 151)
HSLhsl(245, 59%, 37%)
HSVhsv(245, 74%, 59%)
CMYKcmyk(67.5%, 74.2%, 0%, 40.8%)
CIE-LABlab(24.76, 39.50, -59.45)
CIE-LCHlch(24.76, 71.38, 303.60°)
OKLaboklab(36.84% 0.023 -0.1717)
OKLCHoklch(36.84% 0.173 277.6)
XYZxyz(7.5762, 4.3377, 29.7102)
Luminance0.0434 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312797 #8D9727
analogous
#275597 #312797 #692797
triadic
#312797 #973127 #279731
tetradic
#312797 #972755 #8D9727 #279769
square
#312797 #972755 #8D9727 #279769
split-complementary
#312797 #976927 #559727
monochromatic
#110E36 #211A66 #312797 #4134C8 #6C62D6

Accessibility & contrast

On white

11.24
#312797 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#312797 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312797
11.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312797#FFFFFF#000000##FFFFFF
##3127971.0011.241.8711.24
#FFFFFF11.241.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F9A
Deuteranopia (green-blind)
#003695
Tritanopia (blue-blind)
#00475C
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #312797;
/* rgb */ color: rgb(49, 39, 151);
/* oklch */ color: oklch(36.8% 0.173 277.6);
Tailwind
colors: {
  custom: {
    50: '#7863b7',
    500: '#312797',
    950: '#000000',
  },
}
SCSS
$custom: #312797;
$custom-light: #7863b7;
$custom-dark: #000000;
JSON
{
  "hex": "#312797",
  "rgb": {
    "r": 49,
    "g": 39,
    "b": 151
  },
  "hsl": {
    "h": 245.357,
    "s": 58.947,
    "l": 37.255
  },
  "oklch": {
    "l": 0.3684,
    "c": 0.17323,
    "h": 277.6
  },
  "luminance": 0.04338
}

Semantic roles & 50–950 ramp

primary
#312797
secondary
#B4BC5E
accent
#E246D4
background
#F7F6FB
surface
#EEEBF6
border
#C9C6D0
text
#0A0511
muted
#7C7A80

Preview Lab

Preview with #312797

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

Preview Lab → · Contrast checker → · Palette generator →

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