#31186F#31186F

#31186F is a dark, vivid violet. Relative luminance 0.025; OKLCH L 30.6% C 0.139 H 288.5°. Best body text is #FFFFFF at 14.09:1 contrast (WCAG AA passes).

Color values

HEX#31186F
RGBrgb(49, 24, 111)
HSLhsl(257, 64%, 26%)
HSVhsv(257, 78%, 44%)
CMYKcmyk(55.9%, 78.4%, 0%, 56.5%)
CIE-LABlab(17.71, 35.07, -45.80)
CIE-LCHlch(17.71, 57.69, 307.44°)
OKLaboklab(30.63% 0.044 -0.1317)
OKLCHoklch(30.63% 0.139 288.5)
XYZxyz(4.4617, 2.4537, 15.2744)
Luminance0.0245 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31186F #566F18
analogous
#182B6F #31186F #5D186F
triadic
#31186F #6F3118 #186F31
tetradic
#31186F #6F182B #566F18 #186F5D
square
#31186F #6F182B #566F18 #186F5D
split-complementary
#31186F #6F5D18 #2B6F18
monochromatic
#0B0519 #1B0D3D #31186F #4723A1 #5E2FD2

Accessibility & contrast

On white

14.09
#31186F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31186F
14.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31186F#FFFFFF#000000##FFFFFF
##31186F1.0014.091.4914.09
#FFFFFF14.091.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.091.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #31186f;
/* rgb */ color: rgb(49, 24, 111);
/* oklch */ color: oklch(30.6% 0.139 288.5);
Tailwind
colors: {
  custom: {
    50: '#715899',
    500: '#31186f',
    950: '#000000',
  },
}
SCSS
$custom: #31186f;
$custom-light: #715899;
$custom-dark: #000000;
JSON
{
  "hex": "#31186f",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 111
  },
  "hsl": {
    "h": 257.241,
    "s": 64.444,
    "l": 26.471
  },
  "oklch": {
    "l": 0.30625,
    "c": 0.13884,
    "h": 288.5
  },
  "luminance": 0.02454
}

Semantic roles & 50–950 ramp

primary
#31186F
secondary
#87A53E
accent
#E740B7
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #31186F

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

Preview Lab → · Contrast checker → · Palette generator →

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