#31156A#31156A

#31156A is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.7% C 0.136 H 290.7°. Best body text is #FFFFFF at 14.52:1 contrast (WCAG AA passes).

Color values

HEX#31156A
RGBrgb(49, 21, 106)
HSLhsl(260, 67%, 25%)
HSVhsv(260, 80%, 42%)
CMYKcmyk(53.8%, 80.2%, 0%, 58.4%)
CIE-LABlab(16.65, 35.13, -44.28)
CIE-LCHlch(16.65, 56.52, 308.43°)
OKLaboklab(29.73% 0.048 -0.1272)
OKLCHoklch(29.73% 0.136 290.7)
XYZxyz(4.1356, 2.2297, 13.8454)
Luminance0.0223 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31156A #4E6A15
analogous
#15236A #31156A #5C156A
triadic
#31156A #6A3115 #156A31
tetradic
#31156A #6A1523 #4E6A15 #156A5C
square
#31156A #6A1523 #4E6A15 #156A5C
split-complementary
#31156A #6A5C15 #236A15
monochromatic
#0C051A #190B37 #31156A #491F9D #6029D0

Accessibility & contrast

On white

14.52
#31156A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31156A
14.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31156A#FFFFFF#000000##FFFFFF
##31156A1.0014.521.4514.52
#FFFFFF14.521.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B6C
Deuteranopia (green-blind)
#002768
Tritanopia (blue-blind)
#1D2D3F
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #31156a;
/* rgb */ color: rgb(49, 21, 106);
/* oklch */ color: oklch(29.7% 0.136 290.7);
Tailwind
colors: {
  custom: {
    50: '#705695',
    500: '#31156a',
    950: '#000000',
  },
}
SCSS
$custom: #31156a;
$custom-light: #705695;
$custom-dark: #000000;
JSON
{
  "hex": "#31156a",
  "rgb": {
    "r": 49,
    "g": 21,
    "b": 106
  },
  "hsl": {
    "h": 259.765,
    "s": 66.929,
    "l": 24.902
  },
  "oklch": {
    "l": 0.29728,
    "c": 0.13596,
    "h": 290.7
  },
  "luminance": 0.0223
}

Semantic roles & 50–950 ramp

primary
#31156A
secondary
#7FA13A
accent
#EA3EB1
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030D
muted
#7B787E

Preview Lab

Preview with #31156A

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

Preview Lab → · Contrast checker → · Palette generator →

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