#31187B#31187B

#31187B is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.9% C 0.154 H 285.2°. Best body text is #FFFFFF at 13.57:1 contrast (WCAG AA passes).

Color values

HEX#31187B
RGBrgb(49, 24, 123)
HSLhsl(255, 67%, 29%)
HSVhsv(255, 80%, 48%)
CMYKcmyk(60.2%, 80.5%, 0%, 51.8%)
CIE-LABlab(18.95, 38.75, -51.48)
CIE-LCHlch(18.95, 64.43, 306.97°)
OKLaboklab(31.87% 0.0404 -0.1483)
OKLCHoklch(31.87% 0.154 285.2)
XYZxyz(5.1673, 2.7360, 18.9909)
Luminance0.0274 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31187B #627B18
analogous
#18307B #31187B #63187B
triadic
#31187B #7B3118 #187B31
tetradic
#31187B #7B1830 #627B18 #187B63
square
#31187B #7B1830 #627B18 #187B63
split-complementary
#31187B #7B6318 #307B18
monochromatic
#0A051A #1D0E48 #31187B #4522AE #5F36D8

Accessibility & contrast

On white

13.57
#31187B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31187B
13.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31187B#FFFFFF#000000##FFFFFF
##31187B1.0013.571.5513.57
#FFFFFF13.571.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00317E
Deuteranopia (green-blind)
#002B79
Tritanopia (blue-blind)
#083549
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #31187b;
/* rgb */ color: rgb(49, 24, 123);
/* oklch */ color: oklch(31.9% 0.154 285.2);
Tailwind
colors: {
  custom: {
    50: '#7359a2',
    500: '#31187b',
    950: '#000000',
  },
}
SCSS
$custom: #31187b;
$custom-light: #7359a2;
$custom-dark: #000000;
JSON
{
  "hex": "#31187b",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 123
  },
  "hsl": {
    "h": 255.152,
    "s": 67.347,
    "l": 28.824
  },
  "oklch": {
    "l": 0.31875,
    "c": 0.1537,
    "h": 285.2
  },
  "luminance": 0.02736
}

Semantic roles & 50–950 ramp

primary
#31187B
secondary
#93B03F
accent
#EA3EBF
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #31187B

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

Preview Lab → · Contrast checker → · Palette generator →

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