#311578#311578

#311578 is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.2% C 0.153 H 286.5°. Best body text is #FFFFFF at 13.92:1 contrast (WCAG AA passes).

Color values

HEX#311578
RGBrgb(49, 21, 120)
HSLhsl(257, 70%, 28%)
HSVhsv(257, 83%, 47%)
CMYKcmyk(59.2%, 82.5%, 0%, 52.9%)
CIE-LABlab(18.12, 39.32, -50.93)
CIE-LCHlch(18.12, 64.34, 307.67°)
OKLaboklab(31.2% 0.0435 -0.1467)
OKLCHoklch(31.2% 0.153 286.5)
XYZxyz(4.9239, 2.5451, 17.9974)
Luminance0.0255 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311578 #5C7815
analogous
#152A78 #311578 #631578
triadic
#311578 #783115 #157831
tetradic
#311578 #78152A #5C7815 #157863
square
#311578 #78152A #5C7815 #157863
split-complementary
#311578 #786315 #2A7815
monochromatic
#0B051A #1C0C44 #311578 #461EAC #5E2DDA

Accessibility & contrast

On white

13.92
#311578 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#311578 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311578
13.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311578#FFFFFF#000000##FFFFFF
##3115781.0013.921.5113.92
#FFFFFF13.921.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7B
Deuteranopia (green-blind)
#002976
Tritanopia (blue-blind)
#0E3247
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #311578;
/* rgb */ color: rgb(49, 21, 120);
/* oklch */ color: oklch(31.2% 0.153 286.5);
Tailwind
colors: {
  custom: {
    50: '#7357a0',
    500: '#311578',
    950: '#000000',
  },
}
SCSS
$custom: #311578;
$custom-light: #7357a0;
$custom-dark: #000000;
JSON
{
  "hex": "#311578",
  "rgb": {
    "r": 49,
    "g": 21,
    "b": 120
  },
  "hsl": {
    "h": 256.97,
    "s": 70.213,
    "l": 27.647
  },
  "oklch": {
    "l": 0.31199,
    "c": 0.15297,
    "h": 286.5
  },
  "luminance": 0.02545
}

Semantic roles & 50–950 ramp

primary
#311578
secondary
#8DAE3B
accent
#ED3BBB
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#09030F
muted
#7B787F

Preview Lab

Preview with #311578

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

Preview Lab → · Contrast checker → · Palette generator →

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