#311B8D#311B8D

#311B8D is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.2% C 0.173 H 281.0°. Best body text is #FFFFFF at 12.56:1 contrast (WCAG AA passes).

Color values

HEX#311B8D
RGBrgb(49, 27, 141)
HSLhsl(252, 68%, 33%)
HSVhsv(252, 81%, 55%)
CMYKcmyk(65.2%, 80.9%, 0%, 44.7%)
CIE-LABlab(21.43, 42.77, -58.75)
CIE-LCHlch(21.43, 72.67, 306.05°)
OKLaboklab(34.18% 0.0329 -0.1695)
OKLCHoklch(34.18% 0.173 281)
XYZxyz(6.4648, 3.3594, 25.5019)
Luminance0.0336 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B8D #778D1B
analogous
#1B3E8D #311B8D #6A1B8D
triadic
#311B8D #8D311B #1B8D31
tetradic
#311B8D #8D1B3E #778D1B #1B8D6A
square
#311B8D #8D1B3E #778D1B #1B8D6A
split-complementary
#311B8D #8D6A1B #3E8D1B
monochromatic
#0D0726 #1F115A #311B8D #4325C0 #6347DC

Accessibility & contrast

On white

12.56
#311B8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#311B8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311B8D
12.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B8D#FFFFFF#000000##FFFFFF
##311B8D1.0012.561.6712.56
#FFFFFF12.561.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003790
Deuteranopia (green-blind)
#002F8B
Tritanopia (blue-blind)
#003D54
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #311b8d;
/* rgb */ color: rgb(49, 27, 141);
/* oklch */ color: oklch(34.2% 0.173 281.0);
Tailwind
colors: {
  custom: {
    50: '#775bb0',
    500: '#311b8d',
    950: '#000000',
  },
}
SCSS
$custom: #311b8d;
$custom-light: #775bb0;
$custom-dark: #000000;
JSON
{
  "hex": "#311b8d",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 141
  },
  "hsl": {
    "h": 251.579,
    "s": 67.857,
    "l": 32.941
  },
  "oklch": {
    "l": 0.34183,
    "c": 0.1727,
    "h": 281
  },
  "luminance": 0.0336
}

Semantic roles & 50–950 ramp

primary
#311B8D
secondary
#A6BD46
accent
#EB3DC9
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #311B8D

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

Preview Lab → · Contrast checker → · Palette generator →

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