#311C8B#311C8B

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

Color values

HEX#311C8B
RGBrgb(49, 28, 139)
HSLhsl(251, 66%, 33%)
HSVhsv(251, 80%, 55%)
CMYKcmyk(64.7%, 79.9%, 0%, 45.5%)
CIE-LABlab(21.38, 41.65, -57.58)
CIE-LCHlch(21.38, 71.06, 305.88°)
OKLaboklab(34.09% 0.0329 -0.1661)
OKLCHoklch(34.09% 0.169 281.2)
XYZxyz(6.3406, 3.3471, 24.7330)
Luminance0.0335 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311C8B #768B1C
analogous
#1C3F8B #311C8B #681C8B
triadic
#311C8B #8B311C #1C8B31
tetradic
#311C8B #8B1C3F #768B1C #1C8B68
square
#311C8B #8B1C3F #768B1C #1C8B68
split-complementary
#311C8B #8B681C #3F8B1C
monochromatic
#0D0725 #1F1258 #311C8B #4326BE #6347DA

Accessibility & contrast

On white

12.58
#311C8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311C8B
12.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311C8B#FFFFFF#000000##FFFFFF
##311C8B1.0012.581.6712.58
#FFFFFF12.581.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.581.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #311c8b;
/* rgb */ color: rgb(49, 28, 139);
/* oklch */ color: oklch(34.1% 0.169 281.2);
Tailwind
colors: {
  custom: {
    50: '#765cae',
    500: '#311c8b',
    950: '#000000',
  },
}
SCSS
$custom: #311c8b;
$custom-light: #765cae;
$custom-dark: #000000;
JSON
{
  "hex": "#311c8b",
  "rgb": {
    "r": 49,
    "g": 28,
    "b": 139
  },
  "hsl": {
    "h": 251.351,
    "s": 66.467,
    "l": 32.745
  },
  "oklch": {
    "l": 0.34086,
    "c": 0.16937,
    "h": 281.2
  },
  "luminance": 0.03348
}

Semantic roles & 50–950 ramp

primary
#311C8B
secondary
#A6BC47
accent
#E93EC9
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #311C8B

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

Preview Lab → · Contrast checker → · Palette generator →

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