#311996#311996

#311996 is a dark, vivid violet. Relative luminance 0.035; OKLCH L 35.0% C 0.185 H 279.7°. Best body text is #FFFFFF at 12.28:1 contrast (WCAG AA passes).

Color values

HEX#311996
RGBrgb(49, 25, 150)
HSLhsl(252, 71%, 34%)
HSVhsv(252, 83%, 59%)
CMYKcmyk(67.3%, 83.3%, 0%, 41.2%)
CIE-LABlab(22.12, 46.43, -63.18)
CIE-LCHlch(22.12, 78.41, 306.31°)
OKLaboklab(34.96% 0.0311 -0.1824)
OKLCHoklch(34.96% 0.185 279.7)
XYZxyz(7.1175, 3.5497, 29.1583)
Luminance0.0355 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311996 #7E9619
analogous
#194096 #311996 #701996
triadic
#311996 #963119 #199631
tetradic
#311996 #961940 #7E9619 #199670
square
#311996 #961940 #7E9619 #199670
split-complementary
#311996 #967019 #409619
monochromatic
#0F082D #201062 #311996 #4222CA #6649E1

Accessibility & contrast

On white

12.28
#311996 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.71
#311996 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311996
12.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311996#FFFFFF#000000##FFFFFF
##3119961.0012.281.7112.28
#FFFFFF12.281.0021.001.00
#0000001.7121.001.0021.00
##FFFFFF12.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003999
Deuteranopia (green-blind)
#003094
Tritanopia (blue-blind)
#004059
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #311996;
/* rgb */ color: rgb(49, 25, 150);
/* oklch */ color: oklch(35.0% 0.185 279.7);
Tailwind
colors: {
  custom: {
    50: '#795bb6',
    500: '#311996',
    950: '#000000',
  },
}
SCSS
$custom: #311996;
$custom-light: #795bb6;
$custom-dark: #000000;
JSON
{
  "hex": "#311996",
  "rgb": {
    "r": 49,
    "g": 25,
    "b": 150
  },
  "hsl": {
    "h": 251.52,
    "s": 71.429,
    "l": 34.314
  },
  "oklch": {
    "l": 0.34963,
    "c": 0.18505,
    "h": 279.7
  },
  "luminance": 0.0355
}

Semantic roles & 50–950 ramp

primary
#311996
secondary
#ABC249
accent
#EE3ACC
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #311996

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

Preview Lab → · Contrast checker → · Palette generator →

#311996 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva