#311F98#311F98

#311F98 is a dark, vivid blue. Relative luminance 0.039; OKLCH L 35.9% C 0.182 H 278.7°. Best body text is #FFFFFF at 11.80:1 contrast (WCAG AA passes).

Color values

HEX#311F98
RGBrgb(49, 31, 152)
HSLhsl(249, 66%, 36%)
HSVhsv(249, 80%, 60%)
CMYKcmyk(67.8%, 79.6%, 0%, 40.4%)
CIE-LABlab(23.34, 44.17, -62.41)
CIE-LCHlch(23.34, 76.46, 305.29°)
OKLaboklab(35.87% 0.0275 -0.1803)
OKLCHoklch(35.87% 0.182 278.7)
XYZxyz(7.4223, 3.8993, 30.0612)
Luminance0.0390 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311F98 #86981F
analogous
#1F4998 #311F98 #6D1F98
triadic
#311F98 #98311F #1F9831
tetradic
#311F98 #981F49 #86981F #1F986D
square
#311F98 #981F49 #86981F #1F986D
split-complementary
#311F98 #986D1F #49981F
monochromatic
#100A32 #211565 #311F98 #4129CB #6955DC

Accessibility & contrast

On white

11.80
#311F98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.78
#311F98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311F98
11.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311F98#FFFFFF#000000##FFFFFF
##311F981.0011.801.7811.80
#FFFFFF11.801.0021.001.00
#0000001.7821.001.0021.00
##FFFFFF11.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C9B
Deuteranopia (green-blind)
#003396
Tritanopia (blue-blind)
#00435B
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #311f98;
/* rgb */ color: rgb(49, 31, 152);
/* oklch */ color: oklch(35.9% 0.182 278.7);
Tailwind
colors: {
  custom: {
    50: '#795eb8',
    500: '#311f98',
    950: '#000000',
  },
}
SCSS
$custom: #311f98;
$custom-light: #795eb8;
$custom-dark: #000000;
JSON
{
  "hex": "#311f98",
  "rgb": {
    "r": 49,
    "g": 31,
    "b": 152
  },
  "hsl": {
    "h": 248.926,
    "s": 66.12,
    "l": 35.882
  },
  "oklch": {
    "l": 0.3587,
    "c": 0.18234,
    "h": 278.7
  },
  "luminance": 0.039
}

Semantic roles & 50–950 ramp

primary
#311F98
secondary
#B0C053
accent
#E93FD0
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0511
muted
#7C7980

Preview Lab

Preview with #311F98

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

Preview Lab → · Contrast checker → · Palette generator →

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