#311D98#311D98

#311D98 is a dark, vivid blue. Relative luminance 0.038; OKLCH L 35.6% C 0.184 H 278.9°. Best body text is #FFFFFF at 11.93:1 contrast (WCAG AA passes).

Color values

HEX#311D98
RGBrgb(49, 29, 152)
HSLhsl(250, 68%, 35%)
HSVhsv(250, 81%, 60%)
CMYKcmyk(67.8%, 80.9%, 0%, 40.4%)
CIE-LABlab(22.99, 45.16, -62.98)
CIE-LCHlch(22.99, 77.49, 305.64°)
OKLaboklab(35.63% 0.0285 -0.1819)
OKLCHoklch(35.63% 0.184 278.9)
XYZxyz(7.3717, 3.7981, 30.0443)
Luminance0.0380 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311D98 #84981D
analogous
#1D4698 #311D98 #6E1D98
triadic
#311D98 #98311D #1D9831
tetradic
#311D98 #981D46 #84981D #1D986E
square
#311D98 #981D46 #84981D #1D986E
split-complementary
#311D98 #986E1D #46981D
monochromatic
#100931 #201365 #311D98 #4227CB #6852DE

Accessibility & contrast

On white

11.93
#311D98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#311D98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311D98
11.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311D98#FFFFFF#000000##FFFFFF
##311D981.0011.931.7611.93
#FFFFFF11.931.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B9B
Deuteranopia (green-blind)
#003296
Tritanopia (blue-blind)
#00435B
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #311d98;
/* rgb */ color: rgb(49, 29, 152);
/* oklch */ color: oklch(35.6% 0.184 278.9);
Tailwind
colors: {
  custom: {
    50: '#795db8',
    500: '#311d98',
    950: '#000000',
  },
}
SCSS
$custom: #311d98;
$custom-light: #795db8;
$custom-dark: #000000;
JSON
{
  "hex": "#311d98",
  "rgb": {
    "r": 49,
    "g": 29,
    "b": 152
  },
  "hsl": {
    "h": 249.756,
    "s": 67.956,
    "l": 35.49
  },
  "oklch": {
    "l": 0.35631,
    "c": 0.1841,
    "h": 278.9
  },
  "luminance": 0.03799
}

Semantic roles & 50–950 ramp

primary
#311D98
secondary
#AEC150
accent
#EB3DCF
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #311D98

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

Preview Lab → · Contrast checker → · Palette generator →

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