#31197F#31197F

#31197F is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.4% C 0.158 H 284.1°. Best body text is #FFFFFF at 13.32:1 contrast (WCAG AA passes).

Color values

HEX#31197F
RGBrgb(49, 25, 127)
HSLhsl(254, 67%, 30%)
HSVhsv(254, 80%, 50%)
CMYKcmyk(61.4%, 80.3%, 0%, 50.2%)
CIE-LABlab(19.56, 39.47, -53.03)
CIE-LCHlch(19.56, 66.11, 306.66°)
OKLaboklab(32.42% 0.0385 -0.1528)
OKLCHoklch(32.42% 0.158 284.1)
XYZxyz(5.4438, 2.8802, 20.3436)
Luminance0.0288 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31197F #677F19
analogous
#19347F #31197F #64197F
triadic
#31197F #7F3119 #197F31
tetradic
#31197F #7F1934 #677F19 #197F64
square
#31197F #7F1934 #677F19 #197F64
split-complementary
#31197F #7F6419 #347F19
monochromatic
#0A051A #1D0F4C #31197F #4523B2 #5F3AD8

Accessibility & contrast

On white

13.32
#31197F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#31197F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31197F
13.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31197F#FFFFFF#000000##FFFFFF
##31197F1.0013.321.5813.32
#FFFFFF13.321.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003282
Deuteranopia (green-blind)
#002C7D
Tritanopia (blue-blind)
#00374C
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #31197f;
/* rgb */ color: rgb(49, 25, 127);
/* oklch */ color: oklch(32.4% 0.158 284.1);
Tailwind
colors: {
  custom: {
    50: '#7459a5',
    500: '#31197f',
    950: '#000000',
  },
}
SCSS
$custom: #31197f;
$custom-light: #7459a5;
$custom-dark: #000000;
JSON
{
  "hex": "#31197f",
  "rgb": {
    "r": 49,
    "g": 25,
    "b": 127
  },
  "hsl": {
    "h": 254.118,
    "s": 67.105,
    "l": 29.804
  },
  "oklch": {
    "l": 0.32424,
    "c": 0.1576,
    "h": 284.1
  },
  "luminance": 0.02881
}

Semantic roles & 50–950 ramp

primary
#31197F
secondary
#98B341
accent
#EA3EC1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #31197F

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

Preview Lab → · Contrast checker → · Palette generator →

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