#31177A#31177A

#31177A is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.6% C 0.153 H 285.7°. Best body text is #FFFFFF at 13.69:1 contrast (WCAG AA passes).

Color values

HEX#31177A
RGBrgb(49, 23, 122)
HSLhsl(256, 68%, 28%)
HSVhsv(256, 81%, 48%)
CMYKcmyk(59.8%, 81.1%, 0%, 52.2%)
CIE-LABlab(18.67, 38.95, -51.30)
CIE-LCHlch(18.67, 64.41, 307.20°)
OKLaboklab(31.65% 0.0414 -0.1478)
OKLCHoklch(31.65% 0.153 285.7)
XYZxyz(5.0848, 2.6706, 18.6561)
Luminance0.0267 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31177A #607A17
analogous
#172E7A #31177A #62177A
triadic
#31177A #7A3117 #177A31
tetradic
#31177A #7A172E #607A17 #177A62
square
#31177A #7A172E #607A17 #177A62
split-complementary
#31177A #7A6217 #2E7A17
monochromatic
#0A051A #1C0D47 #31177A #4621AD #5E33D9

Accessibility & contrast

On white

13.69
#31177A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#31177A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31177A
13.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31177A#FFFFFF#000000##FFFFFF
##31177A1.0013.691.5313.69
#FFFFFF13.691.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307D
Deuteranopia (green-blind)
#002A78
Tritanopia (blue-blind)
#0A3448
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #31177a;
/* rgb */ color: rgb(49, 23, 122);
/* oklch */ color: oklch(31.6% 0.153 285.7);
Tailwind
colors: {
  custom: {
    50: '#7358a1',
    500: '#31177a',
    950: '#000000',
  },
}
SCSS
$custom: #31177a;
$custom-light: #7358a1;
$custom-dark: #000000;
JSON
{
  "hex": "#31177a",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 122
  },
  "hsl": {
    "h": 255.758,
    "s": 68.276,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31647,
    "c": 0.15347,
    "h": 285.7
  },
  "luminance": 0.02671
}

Semantic roles & 50–950 ramp

primary
#31177A
secondary
#91AF3E
accent
#EB3DBD
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31177A

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

Preview Lab → · Contrast checker → · Palette generator →

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