#31186E#31186E

#31186E is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.5% C 0.138 H 288.7°. Best body text is #FFFFFF at 14.13:1 contrast (WCAG AA passes).

Color values

HEX#31186E
RGBrgb(49, 24, 110)
HSLhsl(257, 64%, 26%)
HSVhsv(257, 78%, 43%)
CMYKcmyk(55.5%, 78.2%, 0%, 56.9%)
CIE-LABlab(17.61, 34.77, -45.32)
CIE-LCHlch(17.61, 57.12, 307.49°)
OKLaboklab(30.52% 0.0442 -0.1303)
OKLCHoklch(30.52% 0.138 288.7)
XYZxyz(4.4069, 2.4318, 14.9860)
Luminance0.0243 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31186E #556E18
analogous
#182A6E #31186E #5C186E
triadic
#31186E #6E3118 #186E31
tetradic
#31186E #6E182A #556E18 #186E5C
square
#31186E #6E182A #556E18 #186E5C
split-complementary
#31186E #6E5C18 #2A6E18
monochromatic
#0B0519 #1B0D3C #31186E #4723A0 #5E2FD2

Accessibility & contrast

On white

14.13
#31186E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#31186E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31186E
14.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31186E#FFFFFF#000000##FFFFFF
##31186E1.0014.131.4914.13
#FFFFFF14.131.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D70
Deuteranopia (green-blind)
#00296C
Tritanopia (blue-blind)
#193042
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #31186e;
/* rgb */ color: rgb(49, 24, 110);
/* oklch */ color: oklch(30.5% 0.138 288.7);
Tailwind
colors: {
  custom: {
    50: '#715898',
    500: '#31186e',
    950: '#000000',
  },
}
SCSS
$custom: #31186e;
$custom-light: #715898;
$custom-dark: #000000;
JSON
{
  "hex": "#31186e",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 110
  },
  "hsl": {
    "h": 257.442,
    "s": 64.179,
    "l": 26.275
  },
  "oklch": {
    "l": 0.30524,
    "c": 0.13758,
    "h": 288.7
  },
  "luminance": 0.02432
}

Semantic roles & 50–950 ramp

primary
#31186E
secondary
#86A43E
accent
#E741B7
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #31186E

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

Preview Lab → · Contrast checker → · Palette generator →

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