#31175A#31175A

#31175A is a dark, moderate violet. Relative luminance 0.020; OKLCH L 28.4% C 0.113 H 296.2°. Best body text is #FFFFFF at 14.99:1 contrast (WCAG AA passes).

Color values

HEX#31175A
RGBrgb(49, 23, 90)
HSLhsl(263, 59%, 22%)
HSVhsv(263, 74%, 35%)
CMYKcmyk(45.6%, 74.4%, 0%, 64.7%)
CIE-LABlab(15.51, 29.23, -35.54)
CIE-LCHlch(15.51, 46.02, 309.43°)
OKLaboklab(28.45% 0.05 -0.1016)
OKLCHoklch(28.45% 0.113 296.2)
XYZxyz(3.4180, 2.0039, 9.8776)
Luminance0.0200 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31175A #405A17
analogous
#171E5A #31175A #53175A
triadic
#31175A #5A3117 #175A31
tetradic
#31175A #5A171E #405A17 #175A53
square
#31175A #5A171E #405A17 #175A53
split-complementary
#31175A #5A5317 #1E5A17
monochromatic
#0D0618 #160B29 #31175A #4C238B #6630BB

Accessibility & contrast

On white

14.99
#31175A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.40
#31175A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31175A
14.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31175A#FFFFFF#000000##FFFFFF
##31175A1.0014.991.4014.99
#FFFFFF14.991.0021.001.00
#0000001.4021.001.0021.00
##FFFFFF14.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00275C
Deuteranopia (green-blind)
#002659
Tritanopia (blue-blind)
#262736
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #31175a;
/* rgb */ color: rgb(49, 23, 90);
/* oklch */ color: oklch(28.4% 0.113 296.2);
Tailwind
colors: {
  custom: {
    50: '#6d5689',
    500: '#31175a',
    950: '#000000',
  },
}
SCSS
$custom: #31175a;
$custom-light: #6d5689;
$custom-dark: #000000;
JSON
{
  "hex": "#31175a",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 90
  },
  "hsl": {
    "h": 263.284,
    "s": 59.292,
    "l": 22.157
  },
  "oklch": {
    "l": 0.28449,
    "c": 0.11321,
    "h": 296.2
  },
  "luminance": 0.02004
}

Semantic roles & 50–950 ramp

primary
#31175A
secondary
#70913C
accent
#E245A5
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07030B
muted
#7A787C

Preview Lab

Preview with #31175A

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

Preview Lab → · Contrast checker → · Palette generator →

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