#31156E#31156E

#31156E is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.1% C 0.141 H 289.4°. Best body text is #FFFFFF at 14.35:1 contrast (WCAG AA passes).

Color values

HEX#31156E
RGBrgb(49, 21, 110)
HSLhsl(259, 68%, 26%)
HSVhsv(259, 81%, 43%)
CMYKcmyk(55.5%, 80.9%, 0%, 56.9%)
CIE-LABlab(17.06, 36.33, -46.22)
CIE-LCHlch(17.06, 58.78, 308.17°)
OKLaboklab(30.14% 0.0467 -0.1329)
OKLCHoklch(30.14% 0.141 289.4)
XYZxyz(4.3484, 2.3149, 14.9665)
Luminance0.0232 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31156E #526E15
analogous
#15266E #31156E #5D156E
triadic
#31156E #6E3115 #156E31
tetradic
#31156E #6E1526 #526E15 #156E5D
square
#31156E #6E1526 #526E15 #156E5D
split-complementary
#31156E #6E5D15 #266E15
monochromatic
#0B051A #1A0B3B #31156E #481FA1 #5F29D5

Accessibility & contrast

On white

14.35
#31156E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#31156E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31156E
14.35:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31156E#FFFFFF#000000##FFFFFF
##31156E1.0014.351.4614.35
#FFFFFF14.351.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.351.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C70
Deuteranopia (green-blind)
#00286C
Tritanopia (blue-blind)
#1A2E41
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #31156e;
/* rgb */ color: rgb(49, 21, 110);
/* oklch */ color: oklch(30.1% 0.141 289.4);
Tailwind
colors: {
  custom: {
    50: '#715698',
    500: '#31156e',
    950: '#000000',
  },
}
SCSS
$custom: #31156e;
$custom-light: #715698;
$custom-dark: #000000;
JSON
{
  "hex": "#31156e",
  "rgb": {
    "r": 49,
    "g": 21,
    "b": 110
  },
  "hsl": {
    "h": 258.876,
    "s": 67.939,
    "l": 25.686
  },
  "oklch": {
    "l": 0.3014,
    "c": 0.14087,
    "h": 289.4
  },
  "luminance": 0.02315
}

Semantic roles & 50–950 ramp

primary
#31156E
secondary
#83A43A
accent
#EB3DB4
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #31156E

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

Preview Lab → · Contrast checker → · Palette generator →

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