#31156B#31156B

#31156B is a dark, vivid violet. Relative luminance 0.023; OKLCH L 29.8% C 0.137 H 290.3°. Best body text is #FFFFFF at 14.48:1 contrast (WCAG AA passes).

Color values

HEX#31156B
RGBrgb(49, 21, 107)
HSLhsl(260, 67%, 25%)
HSVhsv(260, 80%, 42%)
CMYKcmyk(54.2%, 80.4%, 0%, 58%)
CIE-LABlab(16.75, 35.43, -44.77)
CIE-LCHlch(16.75, 57.09, 308.36°)
OKLaboklab(29.83% 0.0477 -0.1286)
OKLCHoklch(29.83% 0.137 290.3)
XYZxyz(4.1879, 2.2507, 14.1208)
Luminance0.0225 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31156B #4F6B15
analogous
#15246B #31156B #5C156B
triadic
#31156B #6B3115 #156B31
tetradic
#31156B #6B1524 #4F6B15 #156B5C
square
#31156B #6B1524 #4F6B15 #156B5C
split-complementary
#31156B #6B5C15 #246B15
monochromatic
#0C051A #1A0B38 #31156B #481F9E #6029D1

Accessibility & contrast

On white

14.48
#31156B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31156B
14.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31156B#FFFFFF#000000##FFFFFF
##31156B1.0014.481.4514.48
#FFFFFF14.481.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B6D
Deuteranopia (green-blind)
#002769
Tritanopia (blue-blind)
#1C2D3F
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #31156b;
/* rgb */ color: rgb(49, 21, 107);
/* oklch */ color: oklch(29.8% 0.137 290.3);
Tailwind
colors: {
  custom: {
    50: '#705696',
    500: '#31156b',
    950: '#000000',
  },
}
SCSS
$custom: #31156b;
$custom-light: #705696;
$custom-dark: #000000;
JSON
{
  "hex": "#31156b",
  "rgb": {
    "r": 49,
    "g": 21,
    "b": 107
  },
  "hsl": {
    "h": 259.535,
    "s": 67.188,
    "l": 25.098
  },
  "oklch": {
    "l": 0.2983,
    "c": 0.13719,
    "h": 290.3
  },
  "luminance": 0.02251
}

Semantic roles & 50–950 ramp

primary
#31156B
secondary
#80A23A
accent
#EA3EB2
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030D
muted
#7B787E

Preview Lab

Preview with #31156B

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

Preview Lab → · Contrast checker → · Palette generator →

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