#311B8A#311B8A

#311B8A is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.9% C 0.169 H 281.5°. Best body text is #FFFFFF at 12.69:1 contrast (WCAG AA passes).

Color values

HEX#311B8A
RGBrgb(49, 27, 138)
HSLhsl(252, 67%, 32%)
HSVhsv(252, 80%, 54%)
CMYKcmyk(64.5%, 80.4%, 0%, 45.9%)
CIE-LABlab(21.10, 41.85, -57.42)
CIE-LCHlch(21.10, 71.05, 306.08°)
OKLaboklab(33.86% 0.0338 -0.1657)
OKLCHoklch(33.86% 0.169 281.5)
XYZxyz(6.2446, 3.2713, 24.3422)
Luminance0.0327 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B8A #748A1B
analogous
#1B3C8A #311B8A #691B8A
triadic
#311B8A #8A311B #1B8A31
tetradic
#311B8A #8A1B3C #748A1B #1B8A69
square
#311B8A #8A1B3C #748A1B #1B8A69
split-complementary
#311B8A #8A691B #3C8A1B
monochromatic
#0D0724 #1F1157 #311B8A #4325BD #6345DB

Accessibility & contrast

On white

12.69
#311B8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311B8A
12.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B8A#FFFFFF#000000##FFFFFF
##311B8A1.0012.691.6512.69
#FFFFFF12.691.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368D
Deuteranopia (green-blind)
#002F88
Tritanopia (blue-blind)
#003C52
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #311b8a;
/* rgb */ color: rgb(49, 27, 138);
/* oklch */ color: oklch(33.9% 0.169 281.5);
Tailwind
colors: {
  custom: {
    50: '#765bad',
    500: '#311b8a',
    950: '#000000',
  },
}
SCSS
$custom: #311b8a;
$custom-light: #765bad;
$custom-dark: #000000;
JSON
{
  "hex": "#311b8a",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 138
  },
  "hsl": {
    "h": 251.892,
    "s": 67.273,
    "l": 32.353
  },
  "oklch": {
    "l": 0.33855,
    "c": 0.16908,
    "h": 281.5
  },
  "luminance": 0.03272
}

Semantic roles & 50–950 ramp

primary
#311B8A
secondary
#A4BC45
accent
#EA3EC8
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #311B8A

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

Preview Lab → · Contrast checker → · Palette generator →

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