#31186D#31186D

#31186D is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.4% C 0.136 H 289.1°. Best body text is #FFFFFF at 14.17:1 contrast (WCAG AA passes).

Color values

HEX#31186D
RGBrgb(49, 24, 109)
HSLhsl(258, 64%, 26%)
HSVhsv(258, 78%, 43%)
CMYKcmyk(55%, 78%, 0%, 57.3%)
CIE-LABlab(17.51, 34.46, -44.83)
CIE-LCHlch(17.51, 56.54, 307.55°)
OKLaboklab(30.42% 0.0445 -0.1288)
OKLCHoklch(30.42% 0.136 289.1)
XYZxyz(4.3528, 2.4102, 14.7009)
Luminance0.0241 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31186D #546D18
analogous
#18296D #31186D #5B186D
triadic
#31186D #6D3118 #186D31
tetradic
#31186D #6D1829 #546D18 #186D5B
square
#31186D #6D1829 #546D18 #186D5B
split-complementary
#31186D #6D5B18 #296D18
monochromatic
#0B0619 #1A0D3B #31186D #48239F #5E2ED1

Accessibility & contrast

On white

14.17
#31186D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31186D
14.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31186D#FFFFFF#000000##FFFFFF
##31186D1.0014.171.4814.17
#FFFFFF14.171.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D6F
Deuteranopia (green-blind)
#00296B
Tritanopia (blue-blind)
#1A2F41
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #31186d;
/* rgb */ color: rgb(49, 24, 109);
/* oklch */ color: oklch(30.4% 0.136 289.1);
Tailwind
colors: {
  custom: {
    50: '#705898',
    500: '#31186d',
    950: '#000000',
  },
}
SCSS
$custom: #31186d;
$custom-light: #705898;
$custom-dark: #000000;
JSON
{
  "hex": "#31186d",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 109
  },
  "hsl": {
    "h": 257.647,
    "s": 63.91,
    "l": 26.078
  },
  "oklch": {
    "l": 0.30423,
    "c": 0.13632,
    "h": 289.1
  },
  "luminance": 0.0241
}

Semantic roles & 50–950 ramp

primary
#31186D
secondary
#85A33E
accent
#E741B6
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #31186D

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

Preview Lab → · Contrast checker → · Palette generator →

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