#31186C#31186C

#31186C is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.3% C 0.135 H 289.4°. Best body text is #FFFFFF at 14.21:1 contrast (WCAG AA passes).

Color values

HEX#31186C
RGBrgb(49, 24, 108)
HSLhsl(258, 64%, 26%)
HSVhsv(258, 78%, 42%)
CMYKcmyk(54.6%, 77.8%, 0%, 57.6%)
CIE-LABlab(17.41, 34.15, -44.34)
CIE-LCHlch(17.41, 55.97, 307.60°)
OKLaboklab(30.32% 0.0448 -0.1274)
OKLCHoklch(30.32% 0.135 289.4)
XYZxyz(4.2992, 2.3888, 14.4190)
Luminance0.0239 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31186C #536C18
analogous
#18296C #31186C #5B186C
triadic
#31186C #6C3118 #186C31
tetradic
#31186C #6C1829 #536C18 #186C5B
square
#31186C #6C1829 #536C18 #186C5B
split-complementary
#31186C #6C5B18 #296C18
monochromatic
#0B0619 #1A0D3A #31186C #48239E #5E2ED0

Accessibility & contrast

On white

14.21
#31186C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.48
#31186C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31186C
14.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31186C#FFFFFF#000000##FFFFFF
##31186C1.0014.211.4814.21
#FFFFFF14.211.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C6E
Deuteranopia (green-blind)
#00296A
Tritanopia (blue-blind)
#1B2F40
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #31186c;
/* rgb */ color: rgb(49, 24, 108);
/* oklch */ color: oklch(30.3% 0.135 289.4);
Tailwind
colors: {
  custom: {
    50: '#705897',
    500: '#31186c',
    950: '#000000',
  },
}
SCSS
$custom: #31186c;
$custom-light: #705897;
$custom-dark: #000000;
JSON
{
  "hex": "#31186c",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 108
  },
  "hsl": {
    "h": 257.857,
    "s": 63.636,
    "l": 25.882
  },
  "oklch": {
    "l": 0.30322,
    "c": 0.13506,
    "h": 289.4
  },
  "luminance": 0.02389
}

Semantic roles & 50–950 ramp

primary
#31186C
secondary
#84A23E
accent
#E741B5
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030D
muted
#7B787E

Preview Lab

Preview with #31186C

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

Preview Lab → · Contrast checker → · Palette generator →

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