#311F7F#311F7F

#311F7F is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.2% C 0.151 H 283.0°. Best body text is #FFFFFF at 12.86:1 contrast (WCAG AA passes).

Color values

HEX#311F7F
RGBrgb(49, 31, 127)
HSLhsl(251, 61%, 31%)
HSVhsv(251, 76%, 50%)
CMYKcmyk(61.4%, 75.6%, 0%, 50.2%)
CIE-LABlab(20.69, 36.24, -51.16)
CIE-LCHlch(20.69, 62.70, 305.31°)
OKLaboklab(33.22% 0.034 -0.1474)
OKLCHoklch(33.22% 0.151 283)
XYZxyz(5.5862, 3.1649, 20.3911)
Luminance0.0316 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311F7F #6D7F1F
analogous
#1F3D7F #311F7F #611F7F
triadic
#311F7F #7F311F #1F7F31
tetradic
#311F7F #7F1F3D #6D7F1F #1F7F61
square
#311F7F #7F1F3D #6D7F1F #1F7F61
split-complementary
#311F7F #7F611F #3D7F1F
monochromatic
#0B071D #1E134E #311F7F #442BB0 #6146D2

Accessibility & contrast

On white

12.86
#311F7F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#311F7F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311F7F
12.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311F7F#FFFFFF#000000##FFFFFF
##311F7F1.0012.861.6312.86
#FFFFFF12.861.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003582
Deuteranopia (green-blind)
#002F7D
Tritanopia (blue-blind)
#003A4D
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #311f7f;
/* rgb */ color: rgb(49, 31, 127);
/* oklch */ color: oklch(33.2% 0.151 283.0);
Tailwind
colors: {
  custom: {
    50: '#735da5',
    500: '#311f7f',
    950: '#000000',
  },
}
SCSS
$custom: #311f7f;
$custom-light: #735da5;
$custom-dark: #000000;
JSON
{
  "hex": "#311f7f",
  "rgb": {
    "r": 49,
    "g": 31,
    "b": 127
  },
  "hsl": {
    "h": 251.25,
    "s": 60.759,
    "l": 30.98
  },
  "oklch": {
    "l": 0.33222,
    "c": 0.15132,
    "h": 283
  },
  "luminance": 0.03165
}

Semantic roles & 50–950 ramp

primary
#311F7F
secondary
#9EB248
accent
#E444C6
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #311F7F

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

Preview Lab → · Contrast checker → · Palette generator →

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