#311F7B#311F7B

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

Color values

HEX#311F7B
RGBrgb(49, 31, 123)
HSLhsl(252, 60%, 30%)
HSVhsv(252, 75%, 48%)
CMYKcmyk(60.2%, 74.8%, 0%, 51.8%)
CIE-LABlab(20.29, 34.95, -49.28)
CIE-LCHlch(20.29, 60.41, 305.35°)
OKLaboklab(32.82% 0.035 -0.1419)
OKLCHoklch(32.82% 0.146 283.8)
XYZxyz(5.3307, 3.0627, 19.0453)
Luminance0.0306 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311F7B #697B1F
analogous
#1F3B7B #311F7B #5F1F7B
triadic
#311F7B #7B311F #1F7B31
tetradic
#311F7B #7B1F3B #697B1F #1F7B5F
square
#311F7B #7B1F3B #697B1F #1F7B5F
split-complementary
#311F7B #7B5F1F #3B7B1F
monochromatic
#0A0619 #1E134A #311F7B #442BAC #6044D0

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##311F7B#FFFFFF#000000##FFFFFF
##311F7B1.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)
#00347E
Deuteranopia (green-blind)
#002E79
Tritanopia (blue-blind)
#07384B
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #311f7b;
/* rgb */ color: rgb(49, 31, 123);
/* oklch */ color: oklch(32.8% 0.146 283.8);
Tailwind
colors: {
  custom: {
    50: '#735da2',
    500: '#311f7b',
    950: '#000000',
  },
}
SCSS
$custom: #311f7b;
$custom-light: #735da2;
$custom-dark: #000000;
JSON
{
  "hex": "#311f7b",
  "rgb": {
    "r": 49,
    "g": 31,
    "b": 123
  },
  "hsl": {
    "h": 251.739,
    "s": 59.74,
    "l": 30.196
  },
  "oklch": {
    "l": 0.32817,
    "c": 0.14617,
    "h": 283.8
  },
  "luminance": 0.03063
}

Semantic roles & 50–950 ramp

primary
#311F7B
secondary
#9AAE48
accent
#E345C4
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #311F7B

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

Preview Lab → · Contrast checker → · Palette generator →

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