#311B9C#311B9C

#311B9C is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.9% C 0.190 H 278.5°. Best body text is #FFFFFF at 11.88:1 contrast (WCAG AA passes).

Color values

HEX#311B9C
RGBrgb(49, 27, 156)
HSLhsl(250, 70%, 36%)
HSVhsv(250, 83%, 61%)
CMYKcmyk(68.6%, 82.7%, 0%, 38.8%)
CIE-LABlab(23.12, 47.31, -65.22)
CIE-LCHlch(23.12, 80.57, 305.96°)
OKLaboklab(35.85% 0.0282 -0.1884)
OKLCHoklch(35.85% 0.19 278.5)
XYZxyz(7.6574, 3.8365, 31.7830)
Luminance0.0384 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B9C #869C1B
analogous
#1B459C #311B9C #711B9C
triadic
#311B9C #9C311B #1B9C31
tetradic
#311B9C #9C1B45 #869C1B #1B9C71
square
#311B9C #9C1B45 #869C1B #1B9C71
split-complementary
#311B9C #9C711B #459C1B
monochromatic
#100934 #211268 #311B9C #4124D0 #6951E1

Accessibility & contrast

On white

11.88
#311B9C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.77
#311B9C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311B9C
11.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B9C#FFFFFF#000000##FFFFFF
##311B9C1.0011.881.7711.88
#FFFFFF11.881.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C9F
Deuteranopia (green-blind)
#00329A
Tritanopia (blue-blind)
#00435D
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #311b9c;
/* rgb */ color: rgb(49, 27, 156);
/* oklch */ color: oklch(35.9% 0.190 278.5);
Tailwind
colors: {
  custom: {
    50: '#7a5cbb',
    500: '#311b9c',
    950: '#000000',
  },
}
SCSS
$custom: #311b9c;
$custom-light: #7a5cbb;
$custom-dark: #000000;
JSON
{
  "hex": "#311b9c",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 156
  },
  "hsl": {
    "h": 250.233,
    "s": 70.492,
    "l": 35.882
  },
  "oklch": {
    "l": 0.35855,
    "c": 0.19047,
    "h": 278.5
  },
  "luminance": 0.03837
}

Semantic roles & 50–950 ramp

primary
#311B9C
secondary
#B0C34F
accent
#ED3BCF
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0412
muted
#7C7981

Preview Lab

Preview with #311B9C

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

Preview Lab → · Contrast checker → · Palette generator →

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