#311872#311872

#311872 is a dark, vivid violet. Relative luminance 0.025; OKLCH L 30.9% C 0.143 H 287.6°. Best body text is #FFFFFF at 13.96:1 contrast (WCAG AA passes).

Color values

HEX#311872
RGBrgb(49, 24, 114)
HSLhsl(257, 65%, 27%)
HSVhsv(257, 79%, 45%)
CMYKcmyk(57%, 78.9%, 0%, 55.3%)
CIE-LABlab(18.01, 35.99, -47.25)
CIE-LCHlch(18.01, 59.39, 307.30°)
OKLaboklab(30.93% 0.0431 -0.1359)
OKLCHoklch(30.93% 0.143 287.6)
XYZxyz(4.6296, 2.5209, 16.1590)
Luminance0.0252 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311872 #597218
analogous
#182C72 #311872 #5E1872
triadic
#311872 #723118 #187231
tetradic
#311872 #72182C #597218 #18725E
square
#311872 #72182C #597218 #18725E
split-complementary
#311872 #725E18 #2C7218
monochromatic
#0B0519 #1B0D3F #311872 #4723A5 #5E31D4

Accessibility & contrast

On white

13.96
#311872 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.50
#311872 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311872
13.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311872#FFFFFF#000000##FFFFFF
##3118721.0013.961.5013.96
#FFFFFF13.961.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF13.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E75
Deuteranopia (green-blind)
#002A70
Tritanopia (blue-blind)
#163144
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #311872;
/* rgb */ color: rgb(49, 24, 114);
/* oklch */ color: oklch(30.9% 0.143 287.6);
Tailwind
colors: {
  custom: {
    50: '#71589b',
    500: '#311872',
    950: '#000000',
  },
}
SCSS
$custom: #311872;
$custom-light: #71589b;
$custom-dark: #000000;
JSON
{
  "hex": "#311872",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 114
  },
  "hsl": {
    "h": 256.667,
    "s": 65.217,
    "l": 27.059
  },
  "oklch": {
    "l": 0.30932,
    "c": 0.14259,
    "h": 287.6
  },
  "luminance": 0.02521
}

Semantic roles & 50–950 ramp

primary
#311872
secondary
#8AA73E
accent
#E840B9
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #311872

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

Preview Lab → · Contrast checker → · Palette generator →

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