#311B8B#311B8B

#311B8B is a dark, vivid violet. Relative luminance 0.033; OKLCH L 34.0% C 0.170 H 281.3°. Best body text is #FFFFFF at 12.65:1 contrast (WCAG AA passes).

Color values

HEX#311B8B
RGBrgb(49, 27, 139)
HSLhsl(252, 67%, 33%)
HSVhsv(252, 81%, 55%)
CMYKcmyk(64.7%, 80.6%, 0%, 45.5%)
CIE-LABlab(21.21, 42.15, -57.86)
CIE-LCHlch(21.21, 71.59, 306.07°)
OKLaboklab(33.96% 0.0335 -0.167)
OKLCHoklch(33.96% 0.17 281.3)
XYZxyz(6.3173, 3.3004, 24.7252)
Luminance0.0330 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B8B #758B1B
analogous
#1B3D8B #311B8B #691B8B
triadic
#311B8B #8B311B #1B8B31
tetradic
#311B8B #8B1B3D #758B1B #1B8B69
square
#311B8B #8B1B3D #758B1B #1B8B69
split-complementary
#311B8B #8B691B #3D8B1B
monochromatic
#0D0725 #1F1158 #311B8B #4325BE #6345DB

Accessibility & contrast

On white

12.65
#311B8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#311B8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311B8B
12.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B8B#FFFFFF#000000##FFFFFF
##311B8B1.0012.651.6612.65
#FFFFFF12.651.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00378E
Deuteranopia (green-blind)
#002F89
Tritanopia (blue-blind)
#003C53
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #311b8b;
/* rgb */ color: rgb(49, 27, 139);
/* oklch */ color: oklch(34.0% 0.170 281.3);
Tailwind
colors: {
  custom: {
    50: '#765bae',
    500: '#311b8b',
    950: '#000000',
  },
}
SCSS
$custom: #311b8b;
$custom-light: #765bae;
$custom-dark: #000000;
JSON
{
  "hex": "#311b8b",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 139
  },
  "hsl": {
    "h": 251.786,
    "s": 67.47,
    "l": 32.549
  },
  "oklch": {
    "l": 0.33964,
    "c": 0.1703,
    "h": 281.3
  },
  "luminance": 0.03301
}

Semantic roles & 50–950 ramp

primary
#311B8B
secondary
#A5BC45
accent
#EA3DC8
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #311B8B

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

Preview Lab → · Contrast checker → · Palette generator →

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