#311D74#311D74

#311D74 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.8% C 0.139 H 285.9°. Best body text is #FFFFFF at 13.47:1 contrast (WCAG AA passes).

Color values

HEX#311D74
RGBrgb(49, 29, 116)
HSLhsl(254, 60%, 28%)
HSVhsv(254, 75%, 45%)
CMYKcmyk(57.8%, 75%, 0%, 54.5%)
CIE-LABlab(19.19, 33.86, -46.60)
CIE-LCHlch(19.19, 57.60, 306.00°)
OKLaboklab(31.83% 0.0383 -0.1341)
OKLCHoklch(31.83% 0.139 285.9)
XYZxyz(4.8574, 2.7924, 16.8026)
Luminance0.0279 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311D74 #60741D
analogous
#1D3474 #311D74 #5C1D74
triadic
#311D74 #74311D #1D7431
tetradic
#311D74 #741D34 #60741D #1D745C
square
#311D74 #741D34 #60741D #1D745C
split-complementary
#311D74 #745C1D #34741D
monochromatic
#0A0618 #1C1143 #311D74 #4629A5 #5E3DCE

Accessibility & contrast

On white

13.47
#311D74 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#311D74 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311D74
13.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311D74#FFFFFF#000000##FFFFFF
##311D741.0013.471.5613.47
#FFFFFF13.471.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003177
Deuteranopia (green-blind)
#002C72
Tritanopia (blue-blind)
#133446
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #311d74;
/* rgb */ color: rgb(49, 29, 116);
/* oklch */ color: oklch(31.8% 0.139 285.9);
Tailwind
colors: {
  custom: {
    50: '#715b9d',
    500: '#311d74',
    950: '#000000',
  },
}
SCSS
$custom: #311d74;
$custom-light: #715b9d;
$custom-dark: #000000;
JSON
{
  "hex": "#311d74",
  "rgb": {
    "r": 49,
    "g": 29,
    "b": 116
  },
  "hsl": {
    "h": 253.793,
    "s": 60,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31826,
    "c": 0.13943,
    "h": 285.9
  },
  "luminance": 0.02793
}

Semantic roles & 50–950 ramp

primary
#311D74
secondary
#91A845
accent
#E345BF
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #311D74

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

Preview Lab → · Contrast checker → · Palette generator →

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