#31187A#31187A

#31187A is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.8% C 0.152 H 285.5°. Best body text is #FFFFFF at 13.62:1 contrast (WCAG AA passes).

Color values

HEX#31187A
RGBrgb(49, 24, 122)
HSLhsl(255, 67%, 29%)
HSVhsv(255, 80%, 48%)
CMYKcmyk(59.8%, 80.3%, 0%, 52.2%)
CIE-LABlab(18.85, 38.44, -51.02)
CIE-LCHlch(18.85, 63.88, 307.00°)
OKLaboklab(31.77% 0.0407 -0.1469)
OKLCHoklch(31.77% 0.152 285.5)
XYZxyz(5.1050, 2.7111, 18.6629)
Luminance0.0271 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31187A #617A18
analogous
#18307A #31187A #62187A
triadic
#31187A #7A3118 #187A31
tetradic
#31187A #7A1830 #617A18 #187A62
square
#31187A #7A1830 #617A18 #187A62
split-complementary
#31187A #7A6218 #307A18
monochromatic
#0A051A #1C0E47 #31187A #4622AD #5E35D7

Accessibility & contrast

On white

13.62
#31187A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#31187A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31187A
13.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31187A#FFFFFF#000000##FFFFFF
##31187A1.0013.621.5413.62
#FFFFFF13.621.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307D
Deuteranopia (green-blind)
#002B78
Tritanopia (blue-blind)
#0A3448
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #31187a;
/* rgb */ color: rgb(49, 24, 122);
/* oklch */ color: oklch(31.8% 0.152 285.5);
Tailwind
colors: {
  custom: {
    50: '#7358a1',
    500: '#31187a',
    950: '#000000',
  },
}
SCSS
$custom: #31187a;
$custom-light: #7358a1;
$custom-dark: #000000;
JSON
{
  "hex": "#31187a",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 122
  },
  "hsl": {
    "h": 255.306,
    "s": 67.123,
    "l": 28.627
  },
  "oklch": {
    "l": 0.31769,
    "c": 0.15248,
    "h": 285.5
  },
  "luminance": 0.02711
}

Semantic roles & 50–950 ramp

primary
#31187A
secondary
#92AF3F
accent
#EA3EBE
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31187A

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

Preview Lab → · Contrast checker → · Palette generator →

#31187A Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva