#31186A#31186A

#31186A is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.1% C 0.133 H 290.0°. Best body text is #FFFFFF at 14.29:1 contrast (WCAG AA passes).

Color values

HEX#31186A
RGBrgb(49, 24, 106)
HSLhsl(258, 63%, 25%)
HSVhsv(258, 77%, 42%)
CMYKcmyk(53.8%, 77.4%, 0%, 58.4%)
CIE-LABlab(17.21, 33.54, -43.36)
CIE-LCHlch(17.21, 54.82, 307.72°)
OKLaboklab(30.12% 0.0453 -0.1245)
OKLCHoklch(30.12% 0.133 290)
XYZxyz(4.1940, 2.3467, 13.8648)
Luminance0.0235 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31186A #516A18
analogous
#18286A #31186A #5A186A
triadic
#31186A #6A3118 #186A31
tetradic
#31186A #6A1828 #516A18 #186A5A
square
#31186A #6A1828 #516A18 #186A5A
split-complementary
#31186A #6A5A18 #286A18
monochromatic
#0C0619 #1A0D38 #31186A #48239C #5F2FCE

Accessibility & contrast

On white

14.29
#31186A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#31186A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31186A
14.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31186A#FFFFFF#000000##FFFFFF
##31186A1.0014.291.4714.29
#FFFFFF14.291.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C6C
Deuteranopia (green-blind)
#002868
Tritanopia (blue-blind)
#1D2E3F
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #31186a;
/* rgb */ color: rgb(49, 24, 106);
/* oklch */ color: oklch(30.1% 0.133 290.0);
Tailwind
colors: {
  custom: {
    50: '#705895',
    500: '#31186a',
    950: '#000000',
  },
}
SCSS
$custom: #31186a;
$custom-light: #705895;
$custom-dark: #000000;
JSON
{
  "hex": "#31186a",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 106
  },
  "hsl": {
    "h": 258.293,
    "s": 63.077,
    "l": 25.49
  },
  "oklch": {
    "l": 0.30123,
    "c": 0.13252,
    "h": 290
  },
  "luminance": 0.02347
}

Semantic roles & 50–950 ramp

primary
#31186A
secondary
#82A03E
accent
#E642B4
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030D
muted
#7B787E

Preview Lab

Preview with #31186A

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

Preview Lab → · Contrast checker → · Palette generator →

#31186A Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva