#31156F#31156F

#31156F is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.2% C 0.142 H 289.1°. Best body text is #FFFFFF at 14.31:1 contrast (WCAG AA passes).

Color values

HEX#31156F
RGBrgb(49, 21, 111)
HSLhsl(259, 68%, 26%)
HSVhsv(259, 81%, 44%)
CMYKcmyk(55.9%, 81.1%, 0%, 56.5%)
CIE-LABlab(17.16, 36.63, -46.70)
CIE-LCHlch(17.16, 59.35, 308.11°)
OKLaboklab(30.24% 0.0464 -0.1343)
OKLCHoklch(30.24% 0.142 289.1)
XYZxyz(4.4032, 2.3368, 15.2549)
Luminance0.0234 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31156F #536F15
analogous
#15266F #31156F #5E156F
triadic
#31156F #6F3115 #156F31
tetradic
#31156F #6F1526 #536F15 #156F5E
square
#31156F #6F1526 #536F15 #156F5E
split-complementary
#31156F #6F5E15 #266F15
monochromatic
#0B051A #1A0B3C #31156F #481FA2 #5E28D6

Accessibility & contrast

On white

14.31
#31156F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#31156F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31156F
14.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31156F#FFFFFF#000000##FFFFFF
##31156F1.0014.311.4714.31
#FFFFFF14.311.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C72
Deuteranopia (green-blind)
#00286D
Tritanopia (blue-blind)
#192F41
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #31156f;
/* rgb */ color: rgb(49, 21, 111);
/* oklch */ color: oklch(30.2% 0.142 289.1);
Tailwind
colors: {
  custom: {
    50: '#715699',
    500: '#31156f',
    950: '#000000',
  },
}
SCSS
$custom: #31156f;
$custom-light: #715699;
$custom-dark: #000000;
JSON
{
  "hex": "#31156f",
  "rgb": {
    "r": 49,
    "g": 21,
    "b": 111
  },
  "hsl": {
    "h": 258.667,
    "s": 68.182,
    "l": 25.882
  },
  "oklch": {
    "l": 0.30244,
    "c": 0.14209,
    "h": 289.1
  },
  "luminance": 0.02337
}

Semantic roles & 50–950 ramp

primary
#31156F
secondary
#84A53A
accent
#EB3DB5
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #31156F

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

Preview Lab → · Contrast checker → · Palette generator →

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