#31148D#31148D

#31148D is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.4% C 0.178 H 281.8°. Best body text is #FFFFFF at 13.00:1 contrast (WCAG AA passes).

Color values

HEX#31148D
RGBrgb(49, 20, 141)
HSLhsl(254, 75%, 32%)
HSVhsv(254, 86%, 55%)
CMYKcmyk(65.2%, 85.8%, 0%, 44.7%)
CIE-LABlab(20.35, 45.94, -60.54)
CIE-LCHlch(20.35, 76.00, 307.19°)
OKLaboklab(33.43% 0.0365 -0.1747)
OKLCHoklch(33.43% 0.178 281.8)
XYZxyz(6.3230, 3.0759, 25.4546)
Luminance0.0308 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31148D #708D14
analogous
#14348D #31148D #6E148D
triadic
#31148D #8D3114 #148D31
tetradic
#31148D #8D1434 #708D14 #148D6E
square
#31148D #8D1434 #708D14 #148D6E
split-complementary
#31148D #8D6E14 #348D14
monochromatic
#0C0522 #1E0C57 #31148D #441CC3 #6139E3

Accessibility & contrast

On white

13.00
#31148D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#31148D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31148D
13.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31148D#FFFFFF#000000##FFFFFF
##31148D1.0013.001.6213.00
#FFFFFF13.001.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF13.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003590
Deuteranopia (green-blind)
#002D8B
Tritanopia (blue-blind)
#003B53
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #31148d;
/* rgb */ color: rgb(49, 20, 141);
/* oklch */ color: oklch(33.4% 0.178 281.8);
Tailwind
colors: {
  custom: {
    50: '#7758b0',
    500: '#31148d',
    950: '#000000',
  },
}
SCSS
$custom: #31148d;
$custom-light: #7758b0;
$custom-dark: #000000;
JSON
{
  "hex": "#31148d",
  "rgb": {
    "r": 49,
    "g": 20,
    "b": 141
  },
  "hsl": {
    "h": 254.38,
    "s": 75.155,
    "l": 31.569
  },
  "oklch": {
    "l": 0.33434,
    "c": 0.17844,
    "h": 281.8
  },
  "luminance": 0.03076
}

Semantic roles & 50–950 ramp

primary
#31148D
secondary
#A1C13C
accent
#F236C5
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #31148D

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

Preview Lab → · Contrast checker → · Palette generator →

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