#31157F#31157F

#31157F is a dark, vivid violet. Relative luminance 0.027; OKLCH L 32.0% C 0.161 H 284.7°. Best body text is #FFFFFF at 13.60:1 contrast (WCAG AA passes).

Color values

HEX#31157F
RGBrgb(49, 21, 127)
HSLhsl(256, 72%, 29%)
HSVhsv(256, 83%, 50%)
CMYKcmyk(61.4%, 83.5%, 0%, 50.2%)
CIE-LABlab(18.89, 41.40, -54.13)
CIE-LCHlch(18.89, 68.15, 307.41°)
OKLaboklab(31.96% 0.041 -0.156)
OKLCHoklch(31.96% 0.161 284.7)
XYZxyz(5.3644, 2.7213, 20.3171)
Luminance0.0272 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31157F #637F15
analogous
#152E7F #31157F #66157F
triadic
#31157F #7F3115 #157F31
tetradic
#31157F #7F152E #637F15 #157F66
square
#31157F #7F152E #637F15 #157F66
split-complementary
#31157F #7F6615 #2E7F15
monochromatic
#0A041A #1D0C4A #31157F #451EB4 #5F31DD

Accessibility & contrast

On white

13.60
#31157F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#31157F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31157F
13.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31157F#FFFFFF#000000##FFFFFF
##31157F1.0013.601.5413.60
#FFFFFF13.601.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003182
Deuteranopia (green-blind)
#002B7D
Tritanopia (blue-blind)
#00354B
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #31157f;
/* rgb */ color: rgb(49, 21, 127);
/* oklch */ color: oklch(32.0% 0.161 284.7);
Tailwind
colors: {
  custom: {
    50: '#7457a5',
    500: '#31157f',
    950: '#000000',
  },
}
SCSS
$custom: #31157f;
$custom-light: #7457a5;
$custom-dark: #000000;
JSON
{
  "hex": "#31157f",
  "rgb": {
    "r": 49,
    "g": 21,
    "b": 127
  },
  "hsl": {
    "h": 255.849,
    "s": 71.622,
    "l": 29.02
  },
  "oklch": {
    "l": 0.31961,
    "c": 0.16131,
    "h": 284.7
  },
  "luminance": 0.02722
}

Semantic roles & 50–950 ramp

primary
#31157F
secondary
#94B43C
accent
#EE39BF
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31157F

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

Preview Lab → · Contrast checker → · Palette generator →

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