#311F80#311F80

#311F80 is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.3% C 0.153 H 282.8°. Best body text is #FFFFFF at 12.82:1 contrast (WCAG AA passes).

Color values

HEX#311F80
RGBrgb(49, 31, 128)
HSLhsl(251, 61%, 31%)
HSVhsv(251, 76%, 50%)
CMYKcmyk(61.7%, 75.8%, 0%, 49.8%)
CIE-LABlab(20.79, 36.56, -51.63)
CIE-LCHlch(20.79, 63.27, 305.31°)
OKLaboklab(33.32% 0.0338 -0.1488)
OKLCHoklch(33.32% 0.153 282.8)
XYZxyz(5.6517, 3.1911, 20.7360)
Luminance0.0319 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311F80 #6E801F
analogous
#1F3D80 #311F80 #611F80
triadic
#311F80 #80311F #1F8031
tetradic
#311F80 #801F3D #6E801F #1F8061
square
#311F80 #801F3D #6E801F #1F8061
split-complementary
#311F80 #80611F #3D801F
monochromatic
#0B071D #1E134F #311F80 #442BB1 #6147D2

Accessibility & contrast

On white

12.82
#311F80 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#311F80 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311F80
12.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311F80#FFFFFF#000000##FFFFFF
##311F801.0012.821.6412.82
#FFFFFF12.821.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003583
Deuteranopia (green-blind)
#002F7E
Tritanopia (blue-blind)
#003A4E
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #311f80;
/* rgb */ color: rgb(49, 31, 128);
/* oklch */ color: oklch(33.3% 0.153 282.8);
Tailwind
colors: {
  custom: {
    50: '#745da6',
    500: '#311f80',
    950: '#000000',
  },
}
SCSS
$custom: #311f80;
$custom-light: #745da6;
$custom-dark: #000000;
JSON
{
  "hex": "#311f80",
  "rgb": {
    "r": 49,
    "g": 31,
    "b": 128
  },
  "hsl": {
    "h": 251.134,
    "s": 61.006,
    "l": 31.176
  },
  "oklch": {
    "l": 0.33324,
    "c": 0.1526,
    "h": 282.8
  },
  "luminance": 0.03191
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #311F80

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

Preview Lab → · Contrast checker → · Palette generator →

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