#31157C#31157C

#31157C is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.6% C 0.158 H 285.5°. Best body text is #FFFFFF at 13.73:1 contrast (WCAG AA passes).

Color values

HEX#31157C
RGBrgb(49, 21, 124)
HSLhsl(256, 71%, 28%)
HSVhsv(256, 83%, 49%)
CMYKcmyk(60.5%, 83.1%, 0%, 51.4%)
CIE-LABlab(18.56, 40.51, -52.77)
CIE-LCHlch(18.56, 66.52, 307.51°)
OKLaboklab(31.63% 0.0421 -0.152)
OKLCHoklch(31.63% 0.158 285.5)
XYZxyz(5.1718, 2.6442, 19.3027)
Luminance0.0265 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31157C #607C15
analogous
#152C7C #31157C #64157C
triadic
#31157C #7C3115 #157C31
tetradic
#31157C #7C152C #607C15 #157C64
square
#31157C #7C152C #607C15 #157C64
split-complementary
#31157C #7C6415 #2C7C15
monochromatic
#0A041A #1C0C48 #31157C #461EB0 #5E30DC

Accessibility & contrast

On white

13.73
#31157C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#31157C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31157C
13.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31157C#FFFFFF#000000##FFFFFF
##31157C1.0013.731.5313.73
#FFFFFF13.731.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.731.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #31157c;
/* rgb */ color: rgb(49, 21, 124);
/* oklch */ color: oklch(31.6% 0.158 285.5);
Tailwind
colors: {
  custom: {
    50: '#7457a3',
    500: '#31157c',
    950: '#000000',
  },
}
SCSS
$custom: #31157c;
$custom-light: #7457a3;
$custom-dark: #000000;
JSON
{
  "hex": "#31157c",
  "rgb": {
    "r": 49,
    "g": 21,
    "b": 124
  },
  "hsl": {
    "h": 256.311,
    "s": 71.034,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31633,
    "c": 0.15775,
    "h": 285.5
  },
  "luminance": 0.02645
}

Semantic roles & 50–950 ramp

primary
#31157C
secondary
#91B13C
accent
#EE3ABD
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31157C

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

Preview Lab → · Contrast checker → · Palette generator →

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