#312387#312387

#312387 is a dark, vivid blue. Relative luminance 0.036; OKLCH L 34.6% C 0.157 H 280.7°. Best body text is #FFFFFF at 12.20:1 contrast (WCAG AA passes).

Color values

HEX#312387
RGBrgb(49, 35, 135)
HSLhsl(248, 59%, 33%)
HSVhsv(248, 74%, 53%)
CMYKcmyk(63.7%, 74.1%, 0%, 47.1%)
CIE-LABlab(22.32, 36.55, -53.54)
CIE-LCHlch(22.32, 64.82, 304.32°)
OKLaboklab(34.62% 0.0292 -0.1544)
OKLCHoklch(34.62% 0.157 280.7)
XYZxyz(6.2394, 3.6038, 23.2838)
Luminance0.0360 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312387 #798723
analogous
#234787 #312387 #632387
triadic
#312387 #873123 #238731
tetradic
#312387 #872347 #798723 #238763
square
#312387 #872347 #798723 #238763
split-complementary
#312387 #876323 #478723
monochromatic
#0E0A26 #1F1656 #312387 #4330B8 #6452D2

Accessibility & contrast

On white

12.20
#312387 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.72
#312387 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312387
12.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312387#FFFFFF#000000##FFFFFF
##3123871.0012.201.7212.20
#FFFFFF12.201.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398A
Deuteranopia (green-blind)
#003285
Tritanopia (blue-blind)
#003F52
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #312387;
/* rgb */ color: rgb(49, 35, 135);
/* oklch */ color: oklch(34.6% 0.157 280.7);
Tailwind
colors: {
  custom: {
    50: '#7560ab',
    500: '#312387',
    950: '#000000',
  },
}
SCSS
$custom: #312387;
$custom-light: #7560ab;
$custom-dark: #000000;
JSON
{
  "hex": "#312387",
  "rgb": {
    "r": 49,
    "g": 35,
    "b": 135
  },
  "hsl": {
    "h": 248.4,
    "s": 58.824,
    "l": 33.333
  },
  "oklch": {
    "l": 0.34617,
    "c": 0.15713,
    "h": 280.7
  },
  "luminance": 0.03604
}

Semantic roles & 50–950 ramp

primary
#312387
secondary
#A8B650
accent
#E246CC
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090510
muted
#7B797F

Preview Lab

Preview with #312387

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

Preview Lab → · Contrast checker → · Palette generator →

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