#31186B#31186B

#31186B is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.2% C 0.134 H 289.7°. Best body text is #FFFFFF at 14.25:1 contrast (WCAG AA passes).

Color values

HEX#31186B
RGBrgb(49, 24, 107)
HSLhsl(258, 63%, 26%)
HSVhsv(258, 78%, 42%)
CMYKcmyk(54.2%, 77.6%, 0%, 58%)
CIE-LABlab(17.31, 33.84, -43.85)
CIE-LCHlch(17.31, 55.39, 307.66°)
OKLaboklab(30.22% 0.045 -0.126)
OKLCHoklch(30.22% 0.134 289.7)
XYZxyz(4.2463, 2.3676, 14.1403)
Luminance0.0237 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31186B #526B18
analogous
#18286B #31186B #5A186B
triadic
#31186B #6B3118 #186B31
tetradic
#31186B #6B1828 #526B18 #186B5A
square
#31186B #6B1828 #526B18 #186B5A
split-complementary
#31186B #6B5A18 #286B18
monochromatic
#0B0619 #1A0D39 #31186B #48239D #5F2ECF

Accessibility & contrast

On white

14.25
#31186B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31186B
14.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31186B#FFFFFF#000000##FFFFFF
##31186B1.0014.251.4714.25
#FFFFFF14.251.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C6D
Deuteranopia (green-blind)
#002969
Tritanopia (blue-blind)
#1C2E40
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #31186b;
/* rgb */ color: rgb(49, 24, 107);
/* oklch */ color: oklch(30.2% 0.134 289.7);
Tailwind
colors: {
  custom: {
    50: '#705896',
    500: '#31186b',
    950: '#000000',
  },
}
SCSS
$custom: #31186b;
$custom-light: #705896;
$custom-dark: #000000;
JSON
{
  "hex": "#31186b",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 107
  },
  "hsl": {
    "h": 258.072,
    "s": 63.359,
    "l": 25.686
  },
  "oklch": {
    "l": 0.30222,
    "c": 0.1338,
    "h": 289.7
  },
  "luminance": 0.02368
}

Semantic roles & 50–950 ramp

primary
#31186B
secondary
#83A13E
accent
#E641B5
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030D
muted
#7B787E

Preview Lab

Preview with #31186B

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

Preview Lab → · Contrast checker → · Palette generator →

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