#311D4D#311D4D

#311D4D is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.4% C 0.086 H 300.2°. Best body text is #FFFFFF at 14.86:1 contrast (WCAG AA passes).

Color values

HEX#311D4D
RGBrgb(49, 29, 77)
HSLhsl(265, 45%, 21%)
HSVhsv(265, 62%, 30%)
CMYKcmyk(36.4%, 62.3%, 0%, 69.8%)
CIE-LABlab(15.84, 21.57, -26.20)
CIE-LCHlch(15.84, 33.94, 309.47°)
OKLaboklab(28.36% 0.0432 -0.0741)
OKLCHoklch(28.36% 0.086 300.2)
XYZxyz(3.0452, 2.0675, 7.2584)
Luminance0.0207 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311D4D #394D1D
analogous
#1D214D #311D4D #491D4D
triadic
#311D4D #4D311D #1D4D31
tetradic
#311D4D #4D1D21 #394D1D #1D4D49
square
#311D4D #4D1D21 #394D1D #1D4D49
split-complementary
#311D4D #4D491D #214D1D
monochromatic
#0E0816 #150C21 #311D4D #4D2E79 #6A3EA6

Accessibility & contrast

On white

14.86
#311D4D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.41
#311D4D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311D4D
14.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311D4D#FFFFFF#000000##FFFFFF
##311D4D1.0014.861.4114.86
#FFFFFF14.861.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#08274F
Deuteranopia (green-blind)
#0F274C
Tritanopia (blue-blind)
#2B2731
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #311d4d;
/* rgb */ color: rgb(49, 29, 77);
/* oklch */ color: oklch(28.4% 0.086 300.2);
Tailwind
colors: {
  custom: {
    50: '#6b5a7f',
    500: '#311d4d',
    950: '#000000',
  },
}
SCSS
$custom: #311d4d;
$custom-light: #6b5a7f;
$custom-dark: #000000;
JSON
{
  "hex": "#311d4d",
  "rgb": {
    "r": 49,
    "g": 29,
    "b": 77
  },
  "hsl": {
    "h": 265,
    "s": 45.283,
    "l": 20.784
  },
  "oklch": {
    "l": 0.28356,
    "c": 0.08581,
    "h": 300.2
  },
  "luminance": 0.02068
}

Semantic roles & 50–950 ramp

primary
#311D4D
secondary
#688244
accent
#D5539F
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#07030A
muted
#7A787C

Preview Lab

Preview with #311D4D

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

Preview Lab → · Contrast checker → · Palette generator →

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