#311B9B#311B9B

#311B9B is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.7% C 0.189 H 278.7°. Best body text is #FFFFFF at 11.93:1 contrast (WCAG AA passes).

Color values

HEX#311B9B
RGBrgb(49, 27, 155)
HSLhsl(250, 70%, 36%)
HSVhsv(250, 83%, 61%)
CMYKcmyk(68.4%, 82.6%, 0%, 39.2%)
CIE-LABlab(23.01, 47.01, -64.79)
CIE-LCHlch(23.01, 80.05, 305.96°)
OKLaboklab(35.74% 0.0286 -0.1871)
OKLCHoklch(35.74% 0.189 278.7)
XYZxyz(7.5730, 3.8027, 31.3389)
Luminance0.0380 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B9B #859B1B
analogous
#1B459B #311B9B #711B9B
triadic
#311B9B #9B311B #1B9B31
tetradic
#311B9B #9B1B45 #859B1B #1B9B71
square
#311B9B #9B1B45 #859B1B #1B9B71
split-complementary
#311B9B #9B711B #459B1B
monochromatic
#100933 #211267 #311B9B #4124CF #6950E0

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##311B9B#FFFFFF#000000##FFFFFF
##311B9B1.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)
#003C9E
Deuteranopia (green-blind)
#003299
Tritanopia (blue-blind)
#00435C
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #311b9b;
/* rgb */ color: rgb(49, 27, 155);
/* oklch */ color: oklch(35.7% 0.189 278.7);
Tailwind
colors: {
  custom: {
    50: '#7a5cba',
    500: '#311b9b',
    950: '#000000',
  },
}
SCSS
$custom: #311b9b;
$custom-light: #7a5cba;
$custom-dark: #000000;
JSON
{
  "hex": "#311b9b",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 155
  },
  "hsl": {
    "h": 250.313,
    "s": 70.33,
    "l": 35.686
  },
  "oklch": {
    "l": 0.35742,
    "c": 0.1893,
    "h": 278.7
  },
  "luminance": 0.03803
}

Semantic roles & 50–950 ramp

primary
#311B9B
secondary
#AFC34F
accent
#ED3BCE
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0412
muted
#7C7981

Preview Lab

Preview with #311B9B

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

Preview Lab → · Contrast checker → · Palette generator →

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