#31148F#31148F

#31148F is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.7% C 0.181 H 281.4°. Best body text is #FFFFFF at 12.91:1 contrast (WCAG AA passes).

Color values

HEX#31148F
RGBrgb(49, 20, 143)
HSLhsl(254, 75%, 32%)
HSVhsv(254, 86%, 56%)
CMYKcmyk(65.7%, 86%, 0%, 43.9%)
CIE-LABlab(20.58, 46.51, -61.40)
CIE-LCHlch(20.58, 77.03, 307.15°)
OKLaboklab(33.66% 0.0358 -0.1772)
OKLCHoklch(33.66% 0.181 281.4)
XYZxyz(6.4731, 3.1360, 26.2455)
Luminance0.0314 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31148F #728F14
analogous
#14358F #31148F #6E148F
triadic
#31148F #8F3114 #148F31
tetradic
#31148F #8F1435 #728F14 #148F6E
square
#31148F #8F1435 #728F14 #148F6E
split-complementary
#31148F #8F6E14 #358F14
monochromatic
#0C0524 #1F0C59 #31148F #431CC5 #623AE3

Accessibility & contrast

On white

12.91
#31148F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#31148F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31148F
12.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31148F#FFFFFF#000000##FFFFFF
##31148F1.0012.911.6312.91
#FFFFFF12.911.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003692
Deuteranopia (green-blind)
#002D8D
Tritanopia (blue-blind)
#003C54
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #31148f;
/* rgb */ color: rgb(49, 20, 143);
/* oklch */ color: oklch(33.7% 0.181 281.4);
Tailwind
colors: {
  custom: {
    50: '#7858b1',
    500: '#31148f',
    950: '#000000',
  },
}
SCSS
$custom: #31148f;
$custom-light: #7858b1;
$custom-dark: #000000;
JSON
{
  "hex": "#31148f",
  "rgb": {
    "r": 49,
    "g": 20,
    "b": 143
  },
  "hsl": {
    "h": 254.146,
    "s": 75.46,
    "l": 31.961
  },
  "oklch": {
    "l": 0.33664,
    "c": 0.18074,
    "h": 281.4
  },
  "luminance": 0.03136
}

Semantic roles & 50–950 ramp

primary
#31148F
secondary
#A3C33C
accent
#F236C6
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #31148F

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

Preview Lab → · Contrast checker → · Palette generator →

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