#31147D#31147D

#31147D is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.6% C 0.160 H 285.4°. Best body text is #FFFFFF at 13.75:1 contrast (WCAG AA passes).

Color values

HEX#31147D
RGBrgb(49, 20, 125)
HSLhsl(257, 72%, 28%)
HSVhsv(257, 84%, 49%)
CMYKcmyk(60.8%, 84%, 0%, 51%)
CIE-LABlab(18.51, 41.26, -53.48)
CIE-LCHlch(18.51, 67.55, 307.65°)
OKLaboklab(31.63% 0.0424 -0.1541)
OKLCHoklch(31.63% 0.16 285.4)
XYZxyz(5.2173, 2.6336, 19.6315)
Luminance0.0263 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31147D #607D14
analogous
#142C7D #31147D #65147D
triadic
#31147D #7D3114 #147D31
tetradic
#31147D #7D142C #607D14 #147D65
square
#31147D #7D142C #607D14 #147D65
split-complementary
#31147D #7D6514 #2C7D14
monochromatic
#0A041A #1C0C48 #31147D #461CB2 #5E2EDE

Accessibility & contrast

On white

13.75
#31147D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#31147D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31147D
13.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31147D#FFFFFF#000000##FFFFFF
##31147D1.0013.751.5313.75
#FFFFFF13.751.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003080
Deuteranopia (green-blind)
#002A7B
Tritanopia (blue-blind)
#043449
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #31147d;
/* rgb */ color: rgb(49, 20, 125);
/* oklch */ color: oklch(31.6% 0.160 285.4);
Tailwind
colors: {
  custom: {
    50: '#7457a4',
    500: '#31147d',
    950: '#000000',
  },
}
SCSS
$custom: #31147d;
$custom-light: #7457a4;
$custom-dark: #000000;
JSON
{
  "hex": "#31147d",
  "rgb": {
    "r": 49,
    "g": 20,
    "b": 125
  },
  "hsl": {
    "h": 256.571,
    "s": 72.414,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31634,
    "c": 0.15981,
    "h": 285.4
  },
  "luminance": 0.02634
}

Semantic roles & 50–950 ramp

primary
#31147D
secondary
#91B23A
accent
#EF39BD
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31147D

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

Preview Lab → · Contrast checker → · Palette generator →

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