#311F8E#311F8E

#311F8E is a dark, vivid blue. Relative luminance 0.036; OKLCH L 34.8% C 0.170 H 280.2°. Best body text is #FFFFFF at 12.23:1 contrast (WCAG AA passes).

Color values

HEX#311F8E
RGBrgb(49, 31, 142)
HSLhsl(250, 64%, 34%)
HSVhsv(250, 78%, 56%)
CMYKcmyk(65.5%, 78.2%, 0%, 44.3%)
CIE-LABlab(22.25, 41.03, -58.02)
CIE-LCHlch(22.25, 71.06, 305.27°)
OKLaboklab(34.79% 0.0302 -0.1674)
OKLCHoklch(34.79% 0.17 280.2)
XYZxyz(6.6375, 3.5854, 25.9282)
Luminance0.0359 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311F8E #7C8E1F
analogous
#1F458E #311F8E #691F8E
triadic
#311F8E #8E311F #1F8E31
tetradic
#311F8E #8E1F45 #7C8E1F #1F8E69
square
#311F8E #8E1F45 #7C8E1F #1F8E69
split-complementary
#311F8E #8E691F #458E1F
monochromatic
#0E092A #20145C #311F8E #422AC0 #654FD9

Accessibility & contrast

On white

12.23
#311F8E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.72
#311F8E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311F8E
12.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311F8E#FFFFFF#000000##FFFFFF
##311F8E1.0012.231.7212.23
#FFFFFF12.231.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003991
Deuteranopia (green-blind)
#00318C
Tritanopia (blue-blind)
#003F55
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #311f8e;
/* rgb */ color: rgb(49, 31, 142);
/* oklch */ color: oklch(34.8% 0.170 280.2);
Tailwind
colors: {
  custom: {
    50: '#765eb0',
    500: '#311f8e',
    950: '#000000',
  },
}
SCSS
$custom: #311f8e;
$custom-light: #765eb0;
$custom-dark: #000000;
JSON
{
  "hex": "#311f8e",
  "rgb": {
    "r": 49,
    "g": 31,
    "b": 142
  },
  "hsl": {
    "h": 249.73,
    "s": 64.162,
    "l": 33.922
  },
  "oklch": {
    "l": 0.34789,
    "c": 0.17016,
    "h": 280.2
  },
  "luminance": 0.03586
}

Semantic roles & 50–950 ramp

primary
#311F8E
secondary
#AABB4D
accent
#E741CC
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #311F8E

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

Preview Lab → · Contrast checker → · Palette generator →

#311F8E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva