#31118E#31118E

#31118E is a dark, vivid violet. Relative luminance 0.030; OKLCH L 33.3% C 0.182 H 281.9°. Best body text is #FFFFFF at 13.11:1 contrast (WCAG AA passes).

Color values

HEX#31118E
RGBrgb(49, 17, 142)
HSLhsl(255, 79%, 31%)
HSVhsv(255, 88%, 56%)
CMYKcmyk(65.5%, 88%, 0%, 44.3%)
CIE-LABlab(20.07, 47.39, -61.62)
CIE-LCHlch(20.07, 77.74, 307.56°)
OKLaboklab(33.28% 0.0374 -0.1778)
OKLCHoklch(33.28% 0.182 281.9)
XYZxyz(6.3480, 3.0064, 25.8317)
Luminance0.0301 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31118E #6E8E11
analogous
#112F8E #31118E #6F118E
triadic
#31118E #8E3111 #118E31
tetradic
#31118E #8E112F #6E8E11 #118E6F
square
#31118E #8E112F #6E8E11 #118E6F
split-complementary
#31118E #8E6F11 #2F8E11
monochromatic
#0B0421 #1E0A57 #31118E #4418C5 #6133E7

Accessibility & contrast

On white

13.11
#31118E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#31118E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31118E
13.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31118E#FFFFFF#000000##FFFFFF
##31118E1.0013.111.6013.11
#FFFFFF13.111.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003491
Deuteranopia (green-blind)
#002C8C
Tritanopia (blue-blind)
#003A53
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #31118e;
/* rgb */ color: rgb(49, 17, 142);
/* oklch */ color: oklch(33.3% 0.182 281.9);
Tailwind
colors: {
  custom: {
    50: '#7857b0',
    500: '#31118e',
    950: '#000000',
  },
}
SCSS
$custom: #31118e;
$custom-light: #7857b0;
$custom-dark: #000000;
JSON
{
  "hex": "#31118e",
  "rgb": {
    "r": 49,
    "g": 17,
    "b": 142
  },
  "hsl": {
    "h": 255.36,
    "s": 78.616,
    "l": 31.176
  },
  "oklch": {
    "l": 0.3328,
    "c": 0.18166,
    "h": 281.9
  },
  "luminance": 0.03007
}

Semantic roles & 50–950 ramp

primary
#31118E
secondary
#9FC238
accent
#F533C3
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0311
muted
#7C7880

Preview Lab

Preview with #31118E

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

Preview Lab → · Contrast checker → · Palette generator →

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