#311B9E#311B9E

#311B9E is a dark, vivid violet. Relative luminance 0.039; OKLCH L 36.1% C 0.193 H 278.2°. Best body text is #FFFFFF at 11.79:1 contrast (WCAG AA passes).

Color values

HEX#311B9E
RGBrgb(49, 27, 158)
HSLhsl(250, 71%, 36%)
HSVhsv(250, 83%, 62%)
CMYKcmyk(69%, 82.9%, 0%, 38%)
CIE-LABlab(23.35, 47.91, -66.06)
CIE-LCHlch(23.35, 81.60, 305.95°)
OKLaboklab(36.08% 0.0276 -0.1908)
OKLCHoklch(36.08% 0.193 278.2)
XYZxyz(7.8281, 3.9048, 32.6823)
Luminance0.0391 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B9E #889E1B
analogous
#1B479E #311B9E #731B9E
triadic
#311B9E #9E311B #1B9E31
tetradic
#311B9E #9E1B47 #889E1B #1B9E73
square
#311B9E #9E1B47 #889E1B #1B9E73
split-complementary
#311B9E #9E731B #479E1B
monochromatic
#110935 #21126A #311B9E #4124D2 #6A52E1

Accessibility & contrast

On white

11.79
#311B9E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311B9E
11.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B9E#FFFFFF#000000##FFFFFF
##311B9E1.0011.791.7811.79
#FFFFFF11.791.0021.001.00
#0000001.7821.001.0021.00
##FFFFFF11.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003DA2
Deuteranopia (green-blind)
#00329C
Tritanopia (blue-blind)
#00445E
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #311b9e;
/* rgb */ color: rgb(49, 27, 158);
/* oklch */ color: oklch(36.1% 0.193 278.2);
Tailwind
colors: {
  custom: {
    50: '#7a5dbc',
    500: '#311b9e',
    950: '#000000',
  },
}
SCSS
$custom: #311b9e;
$custom-light: #7a5dbc;
$custom-dark: #000000;
JSON
{
  "hex": "#311b9e",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 158
  },
  "hsl": {
    "h": 250.076,
    "s": 70.811,
    "l": 36.275
  },
  "oklch": {
    "l": 0.36082,
    "c": 0.1928,
    "h": 278.2
  },
  "luminance": 0.03905
}

Semantic roles & 50–950 ramp

primary
#311B9E
secondary
#B1C451
accent
#EE3ACF
background
#F8F5FB
surface
#EFE9F7
border
#CAC5D0
text
#0B0412
muted
#7C7981

Preview Lab

Preview with #311B9E

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

Preview Lab → · Contrast checker → · Palette generator →

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