#31197E#31197E

#31197E is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.3% C 0.156 H 284.4°. Best body text is #FFFFFF at 13.37:1 contrast (WCAG AA passes).

Color values

HEX#31197E
RGBrgb(49, 25, 126)
HSLhsl(254, 67%, 30%)
HSVhsv(254, 80%, 49%)
CMYKcmyk(61.1%, 80.2%, 0%, 50.6%)
CIE-LABlab(19.45, 39.16, -52.57)
CIE-LCHlch(19.45, 65.56, 306.68°)
OKLaboklab(32.32% 0.0388 -0.1515)
OKLCHoklch(32.32% 0.156 284.4)
XYZxyz(5.3790, 2.8542, 20.0021)
Luminance0.0285 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31197E #667E19
analogous
#19347E #31197E #63197E
triadic
#31197E #7E3119 #197E31
tetradic
#31197E #7E1934 #667E19 #197E63
square
#31197E #7E1934 #667E19 #197E63
split-complementary
#31197E #7E6319 #347E19
monochromatic
#0A051A #1D0F4B #31197E #4523B1 #5F3AD8

Accessibility & contrast

On white

13.37
#31197E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#31197E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31197E
13.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31197E#FFFFFF#000000##FFFFFF
##31197E1.0013.371.5713.37
#FFFFFF13.371.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.371.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #31197e;
/* rgb */ color: rgb(49, 25, 126);
/* oklch */ color: oklch(32.3% 0.156 284.4);
Tailwind
colors: {
  custom: {
    50: '#7459a4',
    500: '#31197e',
    950: '#000000',
  },
}
SCSS
$custom: #31197e;
$custom-light: #7459a4;
$custom-dark: #000000;
JSON
{
  "hex": "#31197e",
  "rgb": {
    "r": 49,
    "g": 25,
    "b": 126
  },
  "hsl": {
    "h": 254.257,
    "s": 66.887,
    "l": 29.608
  },
  "oklch": {
    "l": 0.32317,
    "c": 0.15638,
    "h": 284.4
  },
  "luminance": 0.02855
}

Semantic roles & 50–950 ramp

primary
#31197E
secondary
#97B241
accent
#EA3EC1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #31197E

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

Preview Lab → · Contrast checker → · Palette generator →

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