#31187C#31187C

#31187C is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.0% C 0.155 H 285.0°. Best body text is #FFFFFF at 13.53:1 contrast (WCAG AA passes).

Color values

HEX#31187C
RGBrgb(49, 24, 124)
HSLhsl(255, 68%, 29%)
HSVhsv(255, 81%, 49%)
CMYKcmyk(60.5%, 80.6%, 0%, 51.4%)
CIE-LABlab(19.06, 39.06, -51.94)
CIE-LCHlch(19.06, 64.99, 306.94°)
OKLaboklab(31.98% 0.0401 -0.1496)
OKLCHoklch(31.98% 0.155 285)
XYZxyz(5.2302, 2.7611, 19.3222)
Luminance0.0276 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31187C #637C18
analogous
#18317C #31187C #63187C
triadic
#31187C #7C3118 #187C31
tetradic
#31187C #7C1831 #637C18 #187C63
square
#31187C #7C1831 #637C18 #187C63
split-complementary
#31187C #7C6318 #317C18
monochromatic
#0A051A #1D0E49 #31187C #4522AF #5F36D8

Accessibility & contrast

On white

13.53
#31187C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#31187C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31187C
13.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31187C#FFFFFF#000000##FFFFFF
##31187C1.0013.531.5513.53
#FFFFFF13.531.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00317F
Deuteranopia (green-blind)
#002B7A
Tritanopia (blue-blind)
#06354A
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #31187c;
/* rgb */ color: rgb(49, 24, 124);
/* oklch */ color: oklch(32.0% 0.155 285.0);
Tailwind
colors: {
  custom: {
    50: '#7359a3',
    500: '#31187c',
    950: '#000000',
  },
}
SCSS
$custom: #31187c;
$custom-light: #7359a3;
$custom-dark: #000000;
JSON
{
  "hex": "#31187c",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 124
  },
  "hsl": {
    "h": 255,
    "s": 67.568,
    "l": 29.02
  },
  "oklch": {
    "l": 0.31981,
    "c": 0.15492,
    "h": 285
  },
  "luminance": 0.02761
}

Semantic roles & 50–950 ramp

primary
#31187C
secondary
#94B13F
accent
#EA3DBF
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #31187C

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

Preview Lab → · Contrast checker → · Palette generator →

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