#311D7B#311D7B

#311D7B is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.5% C 0.148 H 284.3°. Best body text is #FFFFFF at 13.19:1 contrast (WCAG AA passes).

Color values

HEX#311D7B
RGBrgb(49, 29, 123)
HSLhsl(253, 62%, 30%)
HSVhsv(253, 76%, 48%)
CMYKcmyk(60.2%, 76.4%, 0%, 51.8%)
CIE-LABlab(19.89, 36.09, -49.94)
CIE-LCHlch(19.89, 61.62, 305.85°)
OKLaboklab(32.53% 0.0366 -0.1438)
OKLCHoklch(32.53% 0.148 284.3)
XYZxyz(5.2800, 2.9614, 19.0284)
Luminance0.0296 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311D7B #677B1D
analogous
#1D387B #311D7B #601D7B
triadic
#311D7B #7B311D #1D7B31
tetradic
#311D7B #7B1D38 #677B1D #1D7B60
square
#311D7B #7B1D38 #677B1D #1D7B60
split-complementary
#311D7B #7B601D #387B1D
monochromatic
#0A0619 #1D1149 #311D7B #4529AD #5F40D2

Accessibility & contrast

On white

13.19
#311D7B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311D7B
13.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311D7B#FFFFFF#000000##FFFFFF
##311D7B1.0013.191.5913.19
#FFFFFF13.191.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337E
Deuteranopia (green-blind)
#002D79
Tritanopia (blue-blind)
#07374A
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #311d7b;
/* rgb */ color: rgb(49, 29, 123);
/* oklch */ color: oklch(32.5% 0.148 284.3);
Tailwind
colors: {
  custom: {
    50: '#735ba2',
    500: '#311d7b',
    950: '#000000',
  },
}
SCSS
$custom: #311d7b;
$custom-light: #735ba2;
$custom-dark: #000000;
JSON
{
  "hex": "#311d7b",
  "rgb": {
    "r": 49,
    "g": 29,
    "b": 123
  },
  "hsl": {
    "h": 252.766,
    "s": 61.842,
    "l": 29.804
  },
  "oklch": {
    "l": 0.32531,
    "c": 0.14844,
    "h": 284.3
  },
  "luminance": 0.02962
}

Semantic roles & 50–950 ramp

primary
#311D7B
secondary
#98AF45
accent
#E543C2
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #311D7B

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

Preview Lab → · Contrast checker → · Palette generator →

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