#312187#312187

#312187 is a dark, vivid blue. Relative luminance 0.035; OKLCH L 34.3% C 0.159 H 281.1°. Best body text is #FFFFFF at 12.37:1 contrast (WCAG AA passes).

Color values

HEX#312187
RGBrgb(49, 33, 135)
HSLhsl(249, 61%, 33%)
HSVhsv(249, 76%, 53%)
CMYKcmyk(63.7%, 75.6%, 0%, 47.1%)
CIE-LABlab(21.91, 37.69, -54.21)
CIE-LCHlch(21.91, 66.03, 304.81°)
OKLaboklab(34.33% 0.0306 -0.1564)
OKLCHoklch(34.33% 0.159 281.1)
XYZxyz(6.1823, 3.4895, 23.2647)
Luminance0.0349 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312187 #778721
analogous
#214487 #312187 #642187
triadic
#312187 #873121 #218731
tetradic
#312187 #872144 #778721 #218764
square
#312187 #872144 #778721 #218764
split-complementary
#312187 #876421 #448721
monochromatic
#0D0925 #1F1556 #312187 #432DB8 #634FD4

Accessibility & contrast

On white

12.37
#312187 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#312187 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312187
12.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312187#FFFFFF#000000##FFFFFF
##3121871.0012.371.7012.37
#FFFFFF12.371.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388A
Deuteranopia (green-blind)
#003185
Tritanopia (blue-blind)
#003E52
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #312187;
/* rgb */ color: rgb(49, 33, 135);
/* oklch */ color: oklch(34.3% 0.159 281.1);
Tailwind
colors: {
  custom: {
    50: '#755eab',
    500: '#312187',
    950: '#000000',
  },
}
SCSS
$custom: #312187;
$custom-light: #755eab;
$custom-dark: #000000;
JSON
{
  "hex": "#312187",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 135
  },
  "hsl": {
    "h": 249.412,
    "s": 60.714,
    "l": 32.941
  },
  "oklch": {
    "l": 0.34327,
    "c": 0.15933,
    "h": 281.1
  },
  "luminance": 0.0349
}

Semantic roles & 50–950 ramp

primary
#312187
secondary
#A6B74D
accent
#E444CB
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #312187

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

Preview Lab → · Contrast checker → · Palette generator →

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