#31147F#31147F

#31147F is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.9% C 0.162 H 284.9°. Best body text is #FFFFFF at 13.66:1 contrast (WCAG AA passes).

Color values

HEX#31147F
RGBrgb(49, 20, 127)
HSLhsl(256, 73%, 29%)
HSVhsv(256, 84%, 50%)
CMYKcmyk(61.4%, 84.3%, 0%, 50.2%)
CIE-LABlab(18.74, 41.85, -54.39)
CIE-LCHlch(18.74, 68.63, 307.58°)
OKLaboklab(31.86% 0.0416 -0.1567)
OKLCHoklch(31.86% 0.162 284.9)
XYZxyz(5.3464, 2.6852, 20.3111)
Luminance0.0269 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31147F #627F14
analogous
#142D7F #31147F #67147F
triadic
#31147F #7F3114 #147F31
tetradic
#31147F #7F142D #627F14 #147F67
square
#31147F #7F142D #627F14 #147F67
split-complementary
#31147F #7F6714 #2D7F14
monochromatic
#0A041A #1D0C4A #31147F #451CB4 #5F2FDE

Accessibility & contrast

On white

13.66
#31147F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31147F
13.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31147F#FFFFFF#000000##FFFFFF
##31147F1.0013.661.5413.66
#FFFFFF13.661.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.661.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #31147f;
/* rgb */ color: rgb(49, 20, 127);
/* oklch */ color: oklch(31.9% 0.162 284.9);
Tailwind
colors: {
  custom: {
    50: '#7457a5',
    500: '#31147f',
    950: '#000000',
  },
}
SCSS
$custom: #31147f;
$custom-light: #7457a5;
$custom-dark: #000000;
JSON
{
  "hex": "#31147f",
  "rgb": {
    "r": 49,
    "g": 20,
    "b": 127
  },
  "hsl": {
    "h": 256.262,
    "s": 72.789,
    "l": 28.824
  },
  "oklch": {
    "l": 0.31855,
    "c": 0.16217,
    "h": 284.9
  },
  "luminance": 0.02686
}

Semantic roles & 50–950 ramp

primary
#31147F
secondary
#93B43B
accent
#EF38BE
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31147F

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

Preview Lab → · Contrast checker → · Palette generator →

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