#31168C#31168C

#31168C is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.5% C 0.176 H 281.8°. Best body text is #FFFFFF at 12.93:1 contrast (WCAG AA passes).

Color values

HEX#31168C
RGBrgb(49, 22, 140)
HSLhsl(254, 73%, 32%)
HSVhsv(254, 84%, 55%)
CMYKcmyk(65%, 84.3%, 0%, 45.1%)
CIE-LABlab(20.52, 44.79, -59.63)
CIE-LCHlch(20.52, 74.58, 306.91°)
OKLaboklab(33.52% 0.0359 -0.172)
OKLCHoklch(33.52% 0.176 281.8)
XYZxyz(6.2857, 3.1198, 25.0768)
Luminance0.0312 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31168C #718C16
analogous
#16368C #31168C #6C168C
triadic
#31168C #8C3116 #168C31
tetradic
#31168C #8C1636 #718C16 #168C6C
square
#31168C #8C1636 #718C16 #168C6C
split-complementary
#31168C #8C6C16 #368C16
monochromatic
#0C0522 #1E0E57 #31168C #441EC1 #623CE0

Accessibility & contrast

On white

12.93
#31168C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#31168C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31168C
12.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31168C#FFFFFF#000000##FFFFFF
##31168C1.0012.931.6212.93
#FFFFFF12.931.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00358F
Deuteranopia (green-blind)
#002D8A
Tritanopia (blue-blind)
#003B52
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #31168c;
/* rgb */ color: rgb(49, 22, 140);
/* oklch */ color: oklch(33.5% 0.176 281.8);
Tailwind
colors: {
  custom: {
    50: '#7759af',
    500: '#31168c',
    950: '#000000',
  },
}
SCSS
$custom: #31168c;
$custom-light: #7759af;
$custom-dark: #000000;
JSON
{
  "hex": "#31168c",
  "rgb": {
    "r": 49,
    "g": 22,
    "b": 140
  },
  "hsl": {
    "h": 253.729,
    "s": 72.84,
    "l": 31.765
  },
  "oklch": {
    "l": 0.33518,
    "c": 0.17576,
    "h": 281.8
  },
  "luminance": 0.0312
}

Semantic roles & 50–950 ramp

primary
#31168C
secondary
#A2C03E
accent
#F038C6
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #31168C

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

Preview Lab → · Contrast checker → · Palette generator →

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