#311F7E#311F7E

#311F7E is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.1% C 0.150 H 283.2°. Best body text is #FFFFFF at 12.90:1 contrast (WCAG AA passes).

Color values

HEX#311F7E
RGBrgb(49, 31, 126)
HSLhsl(251, 61%, 31%)
HSVhsv(251, 75%, 49%)
CMYKcmyk(61.1%, 75.4%, 0%, 50.6%)
CIE-LABlab(20.59, 35.92, -50.69)
CIE-LCHlch(20.59, 62.13, 305.32°)
OKLaboklab(33.12% 0.0343 -0.1461)
OKLCHoklch(33.12% 0.15 283.2)
XYZxyz(5.5213, 3.1389, 20.0495)
Luminance0.0314 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311F7E #6C7E1F
analogous
#1F3C7E #311F7E #601F7E
triadic
#311F7E #7E311F #1F7E31
tetradic
#311F7E #7E1F3C #6C7E1F #1F7E60
square
#311F7E #7E1F3C #6C7E1F #1F7E60
split-complementary
#311F7E #7E601F #3C7E1F
monochromatic
#0B071C #1E134D #311F7E #442BAF #6046D1

Accessibility & contrast

On white

12.90
#311F7E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311F7E
12.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311F7E#FFFFFF#000000##FFFFFF
##311F7E1.0012.901.6312.90
#FFFFFF12.901.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003581
Deuteranopia (green-blind)
#002E7C
Tritanopia (blue-blind)
#01394C
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #311f7e;
/* rgb */ color: rgb(49, 31, 126);
/* oklch */ color: oklch(33.1% 0.150 283.2);
Tailwind
colors: {
  custom: {
    50: '#735da4',
    500: '#311f7e',
    950: '#000000',
  },
}
SCSS
$custom: #311f7e;
$custom-light: #735da4;
$custom-dark: #000000;
JSON
{
  "hex": "#311f7e",
  "rgb": {
    "r": 49,
    "g": 31,
    "b": 126
  },
  "hsl": {
    "h": 251.368,
    "s": 60.51,
    "l": 30.784
  },
  "oklch": {
    "l": 0.3312,
    "c": 0.15004,
    "h": 283.2
  },
  "luminance": 0.03139
}

Semantic roles & 50–950 ramp

primary
#311F7E
secondary
#9DB148
accent
#E444C5
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #311F7E

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

Preview Lab → · Contrast checker → · Palette generator →

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