#311B7E#311B7E

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

Color values

HEX#311B7E
RGBrgb(49, 27, 126)
HSLhsl(253, 65%, 30%)
HSVhsv(253, 79%, 49%)
CMYKcmyk(61.1%, 78.6%, 0%, 50.6%)
CIE-LABlab(19.81, 38.12, -51.97)
CIE-LCHlch(19.81, 64.46, 306.26°)
OKLaboklab(32.57% 0.0373 -0.1498)
OKLCHoklch(32.57% 0.154 284)
XYZxyz(5.4233, 2.9428, 20.0169)
Luminance0.0294 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B7E #687E1B
analogous
#1B377E #311B7E #621B7E
triadic
#311B7E #7E311B #1B7E31
tetradic
#311B7E #7E1B37 #687E1B #1B7E62
square
#311B7E #7E1B37 #687E1B #1B7E62
split-complementary
#311B7E #7E621B #377E1B
monochromatic
#0A0519 #1D104C #311B7E #4526B0 #603ED6

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##311B7E#FFFFFF#000000##FFFFFF
##311B7E1.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)
#003381
Deuteranopia (green-blind)
#002D7C
Tritanopia (blue-blind)
#01374B
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #311b7e;
/* rgb */ color: rgb(49, 27, 126);
/* oklch */ color: oklch(32.6% 0.154 284.0);
Tailwind
colors: {
  custom: {
    50: '#735aa4',
    500: '#311b7e',
    950: '#000000',
  },
}
SCSS
$custom: #311b7e;
$custom-light: #735aa4;
$custom-dark: #000000;
JSON
{
  "hex": "#311b7e",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 126
  },
  "hsl": {
    "h": 253.333,
    "s": 64.706,
    "l": 30
  },
  "oklch": {
    "l": 0.32572,
    "c": 0.15436,
    "h": 284
  },
  "luminance": 0.02943
}

Semantic roles & 50–950 ramp

primary
#311B7E
secondary
#99B243
accent
#E840C2
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #311B7E

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

Preview Lab → · Contrast checker → · Palette generator →

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