#31167C#31167C

#31167C is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.7% C 0.157 H 285.3°. Best body text is #FFFFFF at 13.67:1 contrast (WCAG AA passes).

Color values

HEX#31167C
RGBrgb(49, 22, 124)
HSLhsl(256, 70%, 29%)
HSVhsv(256, 82%, 49%)
CMYKcmyk(60.5%, 82.3%, 0%, 51.4%)
CIE-LABlab(18.72, 40.04, -52.50)
CIE-LCHlch(18.72, 66.02, 307.33°)
OKLaboklab(31.75% 0.0414 -0.1513)
OKLCHoklch(31.75% 0.157 285.3)
XYZxyz(5.1905, 2.6817, 19.3090)
Luminance0.0268 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31167C #617C16
analogous
#162E7C #31167C #64167C
triadic
#31167C #7C3116 #167C31
tetradic
#31167C #7C162E #617C16 #167C64
square
#31167C #7C162E #617C16 #167C64
split-complementary
#31167C #7C6416 #2E7C16
monochromatic
#0A051A #1C0D48 #31167C #461FB0 #5E32DB

Accessibility & contrast

On white

13.67
#31167C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#31167C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31167C
13.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31167C#FFFFFF#000000##FFFFFF
##31167C1.0013.671.5413.67
#FFFFFF13.671.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307F
Deuteranopia (green-blind)
#002A7A
Tritanopia (blue-blind)
#063449
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #31167c;
/* rgb */ color: rgb(49, 22, 124);
/* oklch */ color: oklch(31.7% 0.157 285.3);
Tailwind
colors: {
  custom: {
    50: '#7358a3',
    500: '#31167c',
    950: '#000000',
  },
}
SCSS
$custom: #31167c;
$custom-light: #7358a3;
$custom-dark: #000000;
JSON
{
  "hex": "#31167c",
  "rgb": {
    "r": 49,
    "g": 22,
    "b": 124
  },
  "hsl": {
    "h": 255.882,
    "s": 69.863,
    "l": 28.627
  },
  "oklch": {
    "l": 0.31745,
    "c": 0.15683,
    "h": 285.3
  },
  "luminance": 0.02682
}

Semantic roles & 50–950 ramp

primary
#31167C
secondary
#92B13D
accent
#ED3BBE
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31167C

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

Preview Lab → · Contrast checker → · Palette generator →

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