#31148A#31148A

#31148A is a dark, vivid violet. Relative luminance 0.030; OKLCH L 33.1% C 0.175 H 282.4°. Best body text is #FFFFFF at 13.14:1 contrast (WCAG AA passes).

Color values

HEX#31148A
RGBrgb(49, 20, 138)
HSLhsl(255, 75%, 31%)
HSVhsv(255, 86%, 54%)
CMYKcmyk(64.5%, 85.5%, 0%, 45.9%)
CIE-LABlab(20.00, 45.07, -59.25)
CIE-LCHlch(20.00, 74.44, 307.26°)
OKLaboklab(33.09% 0.0376 -0.1709)
OKLCHoklch(33.09% 0.175 282.4)
XYZxyz(6.1028, 2.9878, 24.2949)
Luminance0.0299 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31148A #6D8A14
analogous
#14328A #31148A #6C148A
triadic
#31148A #8A3114 #148A31
tetradic
#31148A #8A1432 #6D8A14 #148A6C
square
#31148A #8A1432 #6D8A14 #148A6C
split-complementary
#31148A #8A6C14 #328A14
monochromatic
#0B051F #1E0C55 #31148A #441CBF #6136E2

Accessibility & contrast

On white

13.14
#31148A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#31148A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31148A
13.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31148A#FFFFFF#000000##FFFFFF
##31148A1.0013.141.6013.14
#FFFFFF13.141.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00348D
Deuteranopia (green-blind)
#002C88
Tritanopia (blue-blind)
#003A51
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #31148a;
/* rgb */ color: rgb(49, 20, 138);
/* oklch */ color: oklch(33.1% 0.175 282.4);
Tailwind
colors: {
  custom: {
    50: '#7658ad',
    500: '#31148a',
    950: '#000000',
  },
}
SCSS
$custom: #31148a;
$custom-light: #7658ad;
$custom-dark: #000000;
JSON
{
  "hex": "#31148a",
  "rgb": {
    "r": 49,
    "g": 20,
    "b": 138
  },
  "hsl": {
    "h": 254.746,
    "s": 74.684,
    "l": 30.98
  },
  "oklch": {
    "l": 0.33091,
    "c": 0.17498,
    "h": 282.4
  },
  "luminance": 0.02988
}

Semantic roles & 50–950 ramp

primary
#31148A
secondary
#9EBE3C
accent
#F136C3
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0310
muted
#7C787F

Preview Lab

Preview with #31148A

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

Preview Lab → · Contrast checker → · Palette generator →

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