#31117E#31117E

#31117E is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.4% C 0.163 H 285.5°. Best body text is #FFFFFF at 13.89:1 contrast (WCAG AA passes).

Color values

HEX#31117E
RGBrgb(49, 17, 126)
HSLhsl(258, 76%, 28%)
HSVhsv(258, 87%, 49%)
CMYKcmyk(61.1%, 86.5%, 0%, 50.6%)
CIE-LABlab(18.19, 42.84, -54.66)
CIE-LCHlch(18.19, 69.44, 308.09°)
OKLaboklab(31.44% 0.0437 -0.1575)
OKLCHoklch(31.44% 0.163 285.5)
XYZxyz(5.2318, 2.5599, 19.9530)
Luminance0.0256 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31117E #5E7E11
analogous
#11277E #31117E #67117E
triadic
#31117E #7E3111 #117E31
tetradic
#31117E #7E1127 #5E7E11 #117E67
square
#31117E #7E1127 #5E7E11 #117E67
split-complementary
#31117E #7E6711 #277E11
monochromatic
#0A041B #1C0A48 #31117E #4618B4 #5E27E2

Accessibility & contrast

On white

13.89
#31117E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#31117E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31117E
13.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31117E#FFFFFF#000000##FFFFFF
##31117E1.0013.891.5113.89
#FFFFFF13.891.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F81
Deuteranopia (green-blind)
#00297C
Tritanopia (blue-blind)
#033349
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #31117e;
/* rgb */ color: rgb(49, 17, 126);
/* oklch */ color: oklch(31.4% 0.163 285.5);
Tailwind
colors: {
  custom: {
    50: '#7455a5',
    500: '#31117e',
    950: '#000000',
  },
}
SCSS
$custom: #31117e;
$custom-light: #7455a5;
$custom-dark: #000000;
JSON
{
  "hex": "#31117e",
  "rgb": {
    "r": 49,
    "g": 17,
    "b": 126
  },
  "hsl": {
    "h": 257.615,
    "s": 76.224,
    "l": 28.039
  },
  "oklch": {
    "l": 0.31443,
    "c": 0.16343,
    "h": 285.5
  },
  "luminance": 0.0256
}

Semantic roles & 50–950 ramp

primary
#31117E
secondary
#8FB437
accent
#F335BB
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31117E

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

Preview Lab → · Contrast checker → · Palette generator →

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