#31177B#31177B

#31177B is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.8% C 0.155 H 285.4°. Best body text is #FFFFFF at 13.64:1 contrast (WCAG AA passes).

Color values

HEX#31177B
RGBrgb(49, 23, 123)
HSLhsl(256, 68%, 29%)
HSVhsv(256, 81%, 48%)
CMYKcmyk(60.2%, 81.3%, 0%, 51.8%)
CIE-LABlab(18.78, 39.25, -51.76)
CIE-LCHlch(18.78, 64.96, 307.17°)
OKLaboklab(31.75% 0.0411 -0.1491)
OKLCHoklch(31.75% 0.155 285.4)
XYZxyz(5.1471, 2.6955, 18.9841)
Luminance0.0270 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31177B #617B17
analogous
#172F7B #31177B #63177B
triadic
#31177B #7B3117 #177B31
tetradic
#31177B #7B172F #617B17 #177B63
square
#31177B #7B172F #617B17 #177B63
split-complementary
#31177B #7B6317 #2F7B17
monochromatic
#0A051A #1C0D47 #31177B #4621AF #5E33D9

Accessibility & contrast

On white

13.64
#31177B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#31177B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31177B
13.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31177B#FFFFFF#000000##FFFFFF
##31177B1.0013.641.5413.64
#FFFFFF13.641.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.641.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #31177b;
/* rgb */ color: rgb(49, 23, 123);
/* oklch */ color: oklch(31.8% 0.155 285.4);
Tailwind
colors: {
  custom: {
    50: '#7358a2',
    500: '#31177b',
    950: '#000000',
  },
}
SCSS
$custom: #31177b;
$custom-light: #7358a2;
$custom-dark: #000000;
JSON
{
  "hex": "#31177b",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 123
  },
  "hsl": {
    "h": 255.6,
    "s": 68.493,
    "l": 28.627
  },
  "oklch": {
    "l": 0.31754,
    "c": 0.15467,
    "h": 285.4
  },
  "luminance": 0.02696
}

Semantic roles & 50–950 ramp

primary
#31177B
secondary
#92B03E
accent
#EB3CBE
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31177B

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

Preview Lab → · Contrast checker → · Palette generator →

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