#31138E#31138E

#31138E is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.5% C 0.180 H 281.7°. Best body text is #FFFFFF at 13.01:1 contrast (WCAG AA passes).

Color values

HEX#31138E
RGBrgb(49, 19, 142)
HSLhsl(255, 76%, 32%)
HSVhsv(255, 87%, 56%)
CMYKcmyk(65.5%, 86.6%, 0%, 44.3%)
CIE-LABlab(20.33, 46.63, -61.20)
CIE-LCHlch(20.33, 76.94, 307.30°)
OKLaboklab(33.46% 0.0366 -0.1766)
OKLCHoklch(33.46% 0.18 281.7)
XYZxyz(6.3804, 3.0712, 25.8425)
Luminance0.0307 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31138E #708E13
analogous
#13338E #31138E #6F138E
triadic
#31138E #8E3113 #138E31
tetradic
#31138E #8E1333 #708E13 #138E6F
square
#31138E #8E1333 #708E13 #138E6F
split-complementary
#31138E #8E6F13 #338E13
monochromatic
#0C0522 #1E0C58 #31138E #441AC4 #6137E4

Accessibility & contrast

On white

13.01
#31138E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#31138E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31138E
13.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31138E#FFFFFF#000000##FFFFFF
##31138E1.0013.011.6113.01
#FFFFFF13.011.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003591
Deuteranopia (green-blind)
#002D8C
Tritanopia (blue-blind)
#003B53
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #31138e;
/* rgb */ color: rgb(49, 19, 142);
/* oklch */ color: oklch(33.5% 0.180 281.7);
Tailwind
colors: {
  custom: {
    50: '#7758b0',
    500: '#31138e',
    950: '#000000',
  },
}
SCSS
$custom: #31138e;
$custom-light: #7758b0;
$custom-dark: #000000;
JSON
{
  "hex": "#31138e",
  "rgb": {
    "r": 49,
    "g": 19,
    "b": 142
  },
  "hsl": {
    "h": 254.634,
    "s": 76.398,
    "l": 31.569
  },
  "oklch": {
    "l": 0.33456,
    "c": 0.1803,
    "h": 281.7
  },
  "luminance": 0.03072
}

Semantic roles & 50–950 ramp

primary
#31138E
secondary
#A1C23B
accent
#F335C5
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0311
muted
#7C7880

Preview Lab

Preview with #31138E

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

Preview Lab → · Contrast checker → · Palette generator →

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