#31148E#31148E

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

Color values

HEX#31148E
RGBrgb(49, 20, 142)
HSLhsl(254, 75%, 32%)
HSVhsv(254, 86%, 56%)
CMYKcmyk(65.5%, 85.9%, 0%, 44.3%)
CIE-LABlab(20.46, 46.22, -60.97)
CIE-LCHlch(20.46, 76.51, 307.17°)
OKLaboklab(33.55% 0.0362 -0.1759)
OKLCHoklch(33.55% 0.18 281.6)
XYZxyz(6.3977, 3.1058, 25.8483)
Luminance0.0311 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31148E #718E14
analogous
#14348E #31148E #6E148E
triadic
#31148E #8E3114 #148E31
tetradic
#31148E #8E1434 #718E14 #148E6E
square
#31148E #8E1434 #718E14 #148E6E
split-complementary
#31148E #8E6E14 #348E14
monochromatic
#0C0523 #1E0C58 #31148E #441CC4 #6239E3

Accessibility & contrast

On white

12.95
#31148E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#31148E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31148E
12.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31148E#FFFFFF#000000##FFFFFF
##31148E1.0012.951.6212.95
#FFFFFF12.951.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.951.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: #31148e;
/* rgb */ color: rgb(49, 20, 142);
/* oklch */ color: oklch(33.5% 0.180 281.6);
Tailwind
colors: {
  custom: {
    50: '#7758b0',
    500: '#31148e',
    950: '#000000',
  },
}
SCSS
$custom: #31148e;
$custom-light: #7758b0;
$custom-dark: #000000;
JSON
{
  "hex": "#31148e",
  "rgb": {
    "r": 49,
    "g": 20,
    "b": 142
  },
  "hsl": {
    "h": 254.262,
    "s": 75.309,
    "l": 31.765
  },
  "oklch": {
    "l": 0.33549,
    "c": 0.17959,
    "h": 281.6
  },
  "luminance": 0.03106
}

Semantic roles & 50–950 ramp

primary
#31148E
secondary
#A2C23C
accent
#F236C5
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #31148E

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

Preview Lab → · Contrast checker → · Palette generator →

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