#311796#311796

#311796 is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.8% C 0.187 H 279.9°. Best body text is #FFFFFF at 12.40:1 contrast (WCAG AA passes).

Color values

HEX#311796
RGBrgb(49, 23, 150)
HSLhsl(252, 73%, 34%)
HSVhsv(252, 85%, 59%)
CMYKcmyk(67.3%, 84.7%, 0%, 41.2%)
CIE-LABlab(21.83, 47.30, -63.68)
CIE-LCHlch(21.83, 79.32, 306.61°)
OKLaboklab(34.76% 0.032 -0.1838)
OKLCHoklch(34.76% 0.187 279.9)
XYZxyz(7.0763, 3.4672, 29.1446)
Luminance0.0347 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311796 #7C9617
analogous
#173D96 #311796 #711796
triadic
#311796 #963117 #179631
tetradic
#311796 #96173D #7C9617 #179671
square
#311796 #96173D #7C9617 #179671
split-complementary
#311796 #967117 #3D9617
monochromatic
#0E072C #200F61 #311796 #421FCB #6545E2

Accessibility & contrast

On white

12.40
#311796 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#311796 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311796
12.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311796#FFFFFF#000000##FFFFFF
##3117961.0012.401.6912.40
#FFFFFF12.401.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003999
Deuteranopia (green-blind)
#002F94
Tritanopia (blue-blind)
#004059
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #311796;
/* rgb */ color: rgb(49, 23, 150);
/* oklch */ color: oklch(34.8% 0.187 279.9);
Tailwind
colors: {
  custom: {
    50: '#795ab6',
    500: '#311796',
    950: '#000000',
  },
}
SCSS
$custom: #311796;
$custom-light: #795ab6;
$custom-dark: #000000;
JSON
{
  "hex": "#311796",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 150
  },
  "hsl": {
    "h": 252.283,
    "s": 73.41,
    "l": 33.922
  },
  "oklch": {
    "l": 0.34758,
    "c": 0.18658,
    "h": 279.9
  },
  "luminance": 0.03468
}

Semantic roles & 50–950 ramp

primary
#311796
secondary
#AAC345
accent
#F038CA
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #311796

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

Preview Lab → · Contrast checker → · Palette generator →

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