#311D7F#311D7F

#311D7F is a dark, vivid violet. Relative luminance 0.031; OKLCH L 32.9% C 0.154 H 283.4°. Best body text is #FFFFFF at 13.02:1 contrast (WCAG AA passes).

Color values

HEX#311D7F
RGBrgb(49, 29, 127)
HSLhsl(252, 63%, 31%)
HSVhsv(252, 77%, 50%)
CMYKcmyk(61.4%, 77.2%, 0%, 50.2%)
CIE-LABlab(20.30, 37.36, -51.81)
CIE-LCHlch(20.30, 63.88, 305.79°)
OKLaboklab(32.94% 0.0356 -0.1493)
OKLCHoklch(32.94% 0.154 283.4)
XYZxyz(5.5356, 3.0636, 20.3742)
Luminance0.0306 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311D7F #6B7F1D
analogous
#1D3A7F #311D7F #621D7F
triadic
#311D7F #7F311D #1D7F31
tetradic
#311D7F #7F1D3A #6B7F1D #1D7F62
square
#311D7F #7F1D3A #6B7F1D #1D7F62
split-complementary
#311D7F #7F621D #3A7F1D
monochromatic
#0B061B #1E124D #311D7F #4428B1 #6042D4

Accessibility & contrast

On white

13.02
#311D7F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#311D7F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311D7F
13.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311D7F#FFFFFF#000000##FFFFFF
##311D7F1.0013.021.6113.02
#FFFFFF13.021.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003482
Deuteranopia (green-blind)
#002E7D
Tritanopia (blue-blind)
#00394C
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #311d7f;
/* rgb */ color: rgb(49, 29, 127);
/* oklch */ color: oklch(32.9% 0.154 283.4);
Tailwind
colors: {
  custom: {
    50: '#735ca5',
    500: '#311d7f',
    950: '#000000',
  },
}
SCSS
$custom: #311d7f;
$custom-light: #735ca5;
$custom-dark: #000000;
JSON
{
  "hex": "#311d7f",
  "rgb": {
    "r": 49,
    "g": 29,
    "b": 127
  },
  "hsl": {
    "h": 252.245,
    "s": 62.821,
    "l": 30.588
  },
  "oklch": {
    "l": 0.32943,
    "c": 0.15351,
    "h": 283.4
  },
  "luminance": 0.03064
}

Semantic roles & 50–950 ramp

primary
#311D7F
secondary
#9CB245
accent
#E642C4
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #311D7F

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

Preview Lab → · Contrast checker → · Palette generator →

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