#31187F#31187F

#31187F is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.3% C 0.159 H 284.3°. Best body text is #FFFFFF at 13.39:1 contrast (WCAG AA passes).

Color values

HEX#31187F
RGBrgb(49, 24, 127)
HSLhsl(255, 68%, 30%)
HSVhsv(255, 81%, 50%)
CMYKcmyk(61.4%, 81.1%, 0%, 50.2%)
CIE-LABlab(19.38, 39.97, -53.32)
CIE-LCHlch(19.38, 66.63, 306.86°)
OKLaboklab(32.3% 0.0391 -0.1537)
OKLCHoklch(32.3% 0.159 284.3)
XYZxyz(5.4228, 2.8382, 20.3366)
Luminance0.0284 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31187F #667F18
analogous
#18337F #31187F #65187F
triadic
#31187F #7F3118 #187F31
tetradic
#31187F #7F1833 #667F18 #187F65
square
#31187F #7F1833 #667F18 #187F65
split-complementary
#31187F #7F6518 #337F18
monochromatic
#0A051A #1D0E4C #31187F #4522B2 #5F38D9

Accessibility & contrast

On white

13.39
#31187F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#31187F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31187F
13.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31187F#FFFFFF#000000##FFFFFF
##31187F1.0013.391.5713.39
#FFFFFF13.391.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.391.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #31187f;
/* rgb */ color: rgb(49, 24, 127);
/* oklch */ color: oklch(32.3% 0.159 284.3);
Tailwind
colors: {
  custom: {
    50: '#7459a5',
    500: '#31187f',
    950: '#000000',
  },
}
SCSS
$custom: #31187f;
$custom-light: #7459a5;
$custom-dark: #000000;
JSON
{
  "hex": "#31187f",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 127
  },
  "hsl": {
    "h": 254.563,
    "s": 68.212,
    "l": 29.608
  },
  "oklch": {
    "l": 0.32303,
    "c": 0.15857,
    "h": 284.3
  },
  "luminance": 0.02839
}

Semantic roles & 50–950 ramp

primary
#31187F
secondary
#97B33F
accent
#EB3DC1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #31187F

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

Preview Lab → · Contrast checker → · Palette generator →

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