#311C87#311C87

#311C87 is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.7% C 0.164 H 282.0°. Best body text is #FFFFFF at 12.75:1 contrast (WCAG AA passes).

Color values

HEX#311C87
RGBrgb(49, 28, 135)
HSLhsl(252, 66%, 32%)
HSVhsv(252, 79%, 53%)
CMYKcmyk(63.7%, 79.3%, 0%, 47.1%)
CIE-LABlab(20.95, 40.41, -55.78)
CIE-LCHlch(20.95, 68.88, 305.92°)
OKLaboklab(33.66% 0.0341 -0.1609)
OKLCHoklch(33.66% 0.164 282)
XYZxyz(6.0537, 3.2323, 23.2219)
Luminance0.0323 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311C87 #72871C
analogous
#1C3C87 #311C87 #671C87
triadic
#311C87 #87311C #1C8731
tetradic
#311C87 #871C3C #72871C #1C8767
square
#311C87 #871C3C #72871C #1C8767
split-complementary
#311C87 #87671C #3C871C
monochromatic
#0C0722 #1F1154 #311C87 #4327BA #6245D8

Accessibility & contrast

On white

12.75
#311C87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#311C87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311C87
12.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311C87#FFFFFF#000000##FFFFFF
##311C871.0012.751.6512.75
#FFFFFF12.751.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368A
Deuteranopia (green-blind)
#002F85
Tritanopia (blue-blind)
#003B51
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #311c87;
/* rgb */ color: rgb(49, 28, 135);
/* oklch */ color: oklch(33.7% 0.164 282.0);
Tailwind
colors: {
  custom: {
    50: '#755bab',
    500: '#311c87',
    950: '#000000',
  },
}
SCSS
$custom: #311c87;
$custom-light: #755bab;
$custom-dark: #000000;
JSON
{
  "hex": "#311c87",
  "rgb": {
    "r": 49,
    "g": 28,
    "b": 135
  },
  "hsl": {
    "h": 251.776,
    "s": 65.644,
    "l": 31.961
  },
  "oklch": {
    "l": 0.33655,
    "c": 0.16448,
    "h": 282
  },
  "luminance": 0.03233
}

Semantic roles & 50–950 ramp

primary
#311C87
secondary
#A3BA45
accent
#E93FC7
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311C87

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

Preview Lab → · Contrast checker → · Palette generator →

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