#31156C#31156C

#31156C is a dark, vivid violet. Relative luminance 0.023; OKLCH L 29.9% C 0.138 H 290.0°. Best body text is #FFFFFF at 14.44:1 contrast (WCAG AA passes).

Color values

HEX#31156C
RGBrgb(49, 21, 108)
HSLhsl(259, 67%, 25%)
HSVhsv(259, 81%, 42%)
CMYKcmyk(54.6%, 80.6%, 0%, 57.6%)
CIE-LABlab(16.85, 35.73, -45.25)
CIE-LCHlch(16.85, 57.66, 308.29°)
OKLaboklab(29.93% 0.0474 -0.1301)
OKLCHoklch(29.93% 0.138 290)
XYZxyz(4.2408, 2.2718, 14.3995)
Luminance0.0227 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31156C #506C15
analogous
#15256C #31156C #5C156C
triadic
#31156C #6C3115 #156C31
tetradic
#31156C #6C1525 #506C15 #156C5C
square
#31156C #6C1525 #506C15 #156C5C
split-complementary
#31156C #6C5C15 #256C15
monochromatic
#0C051A #1A0B39 #31156C #481F9F #5F29D2

Accessibility & contrast

On white

14.44
#31156C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#31156C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31156C
14.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31156C#FFFFFF#000000##FFFFFF
##31156C1.0014.441.4514.44
#FFFFFF14.441.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B6E
Deuteranopia (green-blind)
#00286A
Tritanopia (blue-blind)
#1B2D40
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #31156c;
/* rgb */ color: rgb(49, 21, 108);
/* oklch */ color: oklch(29.9% 0.138 290.0);
Tailwind
colors: {
  custom: {
    50: '#715697',
    500: '#31156c',
    950: '#000000',
  },
}
SCSS
$custom: #31156c;
$custom-light: #715697;
$custom-dark: #000000;
JSON
{
  "hex": "#31156c",
  "rgb": {
    "r": 49,
    "g": 21,
    "b": 108
  },
  "hsl": {
    "h": 259.31,
    "s": 67.442,
    "l": 25.294
  },
  "oklch": {
    "l": 0.29933,
    "c": 0.13841,
    "h": 290
  },
  "luminance": 0.02272
}

Semantic roles & 50–950 ramp

primary
#31156C
secondary
#81A33A
accent
#EA3DB3
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #31156C

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

Preview Lab → · Contrast checker → · Palette generator →

#31156C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva