#31187E#31187E

#31187E is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.2% C 0.157 H 284.5°. Best body text is #FFFFFF at 13.44:1 contrast (WCAG AA passes).

Color values

HEX#31187E
RGBrgb(49, 24, 126)
HSLhsl(255, 68%, 29%)
HSVhsv(255, 81%, 49%)
CMYKcmyk(61.1%, 81%, 0%, 50.6%)
CIE-LABlab(19.28, 39.66, -52.86)
CIE-LCHlch(19.28, 66.09, 306.88°)
OKLaboklab(32.2% 0.0394 -0.1523)
OKLCHoklch(32.2% 0.157 284.5)
XYZxyz(5.3580, 2.8123, 19.9951)
Luminance0.0281 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31187E #657E18
analogous
#18327E #31187E #64187E
triadic
#31187E #7E3118 #187E31
tetradic
#31187E #7E1832 #657E18 #187E64
square
#31187E #7E1832 #657E18 #187E64
split-complementary
#31187E #7E6418 #327E18
monochromatic
#0A051A #1D0E4B #31187E #4522B1 #5F37D9

Accessibility & contrast

On white

13.44
#31187E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#31187E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31187E
13.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31187E#FFFFFF#000000##FFFFFF
##31187E1.0013.441.5613.44
#FFFFFF13.441.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003281
Deuteranopia (green-blind)
#002B7C
Tritanopia (blue-blind)
#02364B
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #31187e;
/* rgb */ color: rgb(49, 24, 126);
/* oklch */ color: oklch(32.2% 0.157 284.5);
Tailwind
colors: {
  custom: {
    50: '#7459a4',
    500: '#31187e',
    950: '#000000',
  },
}
SCSS
$custom: #31187e;
$custom-light: #7459a4;
$custom-dark: #000000;
JSON
{
  "hex": "#31187e",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 126
  },
  "hsl": {
    "h": 254.706,
    "s": 68,
    "l": 29.412
  },
  "oklch": {
    "l": 0.32196,
    "c": 0.15735,
    "h": 284.5
  },
  "luminance": 0.02813
}

Semantic roles & 50–950 ramp

primary
#31187E
secondary
#96B23F
accent
#EB3DC0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #31187E

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

Preview Lab → · Contrast checker → · Palette generator →

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