#31147B#31147B

#31147B is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.4% C 0.157 H 285.9°. Best body text is #FFFFFF at 13.85:1 contrast (WCAG AA passes).

Color values

HEX#31147B
RGBrgb(49, 20, 123)
HSLhsl(257, 72%, 28%)
HSVhsv(257, 84%, 48%)
CMYKcmyk(60.2%, 83.7%, 0%, 51.8%)
CIE-LABlab(18.29, 40.67, -52.57)
CIE-LCHlch(18.29, 66.47, 307.73°)
OKLaboklab(31.41% 0.0431 -0.1514)
OKLCHoklch(31.41% 0.157 285.9)
XYZxyz(5.0908, 2.5830, 18.9654)
Luminance0.0258 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31147B #5E7B14
analogous
#142B7B #31147B #64147B
triadic
#31147B #7B3114 #147B31
tetradic
#31147B #7B142B #5E7B14 #147B64
square
#31147B #7B142B #5E7B14 #147B64
split-complementary
#31147B #7B6414 #2B7B14
monochromatic
#0A041A #1C0B46 #31147B #461DB0 #5E2DDD

Accessibility & contrast

On white

13.85
#31147B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#31147B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31147B
13.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31147B#FFFFFF#000000##FFFFFF
##31147B1.0013.851.5213.85
#FFFFFF13.851.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7E
Deuteranopia (green-blind)
#002A79
Tritanopia (blue-blind)
#093348
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #31147b;
/* rgb */ color: rgb(49, 20, 123);
/* oklch */ color: oklch(31.4% 0.157 285.9);
Tailwind
colors: {
  custom: {
    50: '#7356a2',
    500: '#31147b',
    950: '#000000',
  },
}
SCSS
$custom: #31147b;
$custom-light: #7356a2;
$custom-dark: #000000;
JSON
{
  "hex": "#31147b",
  "rgb": {
    "r": 49,
    "g": 20,
    "b": 123
  },
  "hsl": {
    "h": 256.893,
    "s": 72.028,
    "l": 28.039
  },
  "oklch": {
    "l": 0.31414,
    "c": 0.15745,
    "h": 285.9
  },
  "luminance": 0.02583
}

Semantic roles & 50–950 ramp

primary
#31147B
secondary
#8FB13A
accent
#EF39BC
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31147B

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

Preview Lab → · Contrast checker → · Palette generator →

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