#311F76#311F76

#311F76 is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.3% C 0.140 H 285.0°. Best body text is #FFFFFF at 13.22:1 contrast (WCAG AA passes).

Color values

HEX#311F76
RGBrgb(49, 31, 118)
HSLhsl(252, 58%, 29%)
HSVhsv(252, 74%, 46%)
CMYKcmyk(58.5%, 73.7%, 0%, 53.7%)
CIE-LABlab(19.80, 33.34, -46.88)
CIE-LCHlch(19.80, 57.52, 305.42°)
OKLaboklab(32.32% 0.0361 -0.1349)
OKLCHoklch(32.32% 0.14 285)
XYZxyz(5.0256, 2.9407, 17.4388)
Luminance0.0294 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311F76 #64761F
analogous
#1F3976 #311F76 #5D1F76
triadic
#311F76 #76311F #1F7631
tetradic
#311F76 #761F39 #64761F #1F765D
square
#311F76 #761F39 #64761F #1F765D
split-complementary
#311F76 #765D1F #39761F
monochromatic
#0A0618 #1D1246 #311F76 #452CA6 #5F42CD

Accessibility & contrast

On white

13.22
#311F76 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#311F76 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311F76
13.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311F76#FFFFFF#000000##FFFFFF
##311F761.0013.221.5913.22
#FFFFFF13.221.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003279
Deuteranopia (green-blind)
#002D74
Tritanopia (blue-blind)
#103648
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #311f76;
/* rgb */ color: rgb(49, 31, 118);
/* oklch */ color: oklch(32.3% 0.140 285.0);
Tailwind
colors: {
  custom: {
    50: '#725c9e',
    500: '#311f76',
    950: '#000000',
  },
}
SCSS
$custom: #311f76;
$custom-light: #725c9e;
$custom-dark: #000000;
JSON
{
  "hex": "#311f76",
  "rgb": {
    "r": 49,
    "g": 31,
    "b": 118
  },
  "hsl": {
    "h": 252.414,
    "s": 58.389,
    "l": 29.216
  },
  "oklch": {
    "l": 0.32321,
    "c": 0.13964,
    "h": 285
  },
  "luminance": 0.02941
}

Semantic roles & 50–950 ramp

primary
#311F76
secondary
#95AA47
accent
#E246C1
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #311F76

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

Preview Lab → · Contrast checker → · Palette generator →

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