#31147C#31147C

#31147C is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.5% C 0.159 H 285.6°. Best body text is #FFFFFF at 13.80:1 contrast (WCAG AA passes).

Color values

HEX#31147C
RGBrgb(49, 20, 124)
HSLhsl(257, 72%, 28%)
HSVhsv(257, 84%, 49%)
CMYKcmyk(60.5%, 83.9%, 0%, 51.4%)
CIE-LABlab(18.40, 40.97, -53.03)
CIE-LCHlch(18.40, 67.01, 307.69°)
OKLaboklab(31.52% 0.0427 -0.1528)
OKLCHoklch(31.52% 0.159 285.6)
XYZxyz(5.1538, 2.6082, 19.2967)
Luminance0.0261 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31147C #5F7C14
analogous
#142B7C #31147C #65147C
triadic
#31147C #7C3114 #147C31
tetradic
#31147C #7C142B #5F7C14 #147C65
square
#31147C #7C142B #5F7C14 #147C65
split-complementary
#31147C #7C6514 #2B7C14
monochromatic
#0A041A #1C0B47 #31147C #461DB1 #5E2DDD

Accessibility & contrast

On white

13.80
#31147C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31147C
13.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31147C#FFFFFF#000000##FFFFFF
##31147C1.0013.801.5213.80
#FFFFFF13.801.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307F
Deuteranopia (green-blind)
#002A7A
Tritanopia (blue-blind)
#073449
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #31147c;
/* rgb */ color: rgb(49, 20, 124);
/* oklch */ color: oklch(31.5% 0.159 285.6);
Tailwind
colors: {
  custom: {
    50: '#7457a3',
    500: '#31147c',
    950: '#000000',
  },
}
SCSS
$custom: #31147c;
$custom-light: #7457a3;
$custom-dark: #000000;
JSON
{
  "hex": "#31147c",
  "rgb": {
    "r": 49,
    "g": 20,
    "b": 124
  },
  "hsl": {
    "h": 256.731,
    "s": 72.222,
    "l": 28.235
  },
  "oklch": {
    "l": 0.31524,
    "c": 0.15863,
    "h": 285.6
  },
  "luminance": 0.02609
}

Semantic roles & 50–950 ramp

primary
#31147C
secondary
#90B23A
accent
#EF39BC
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31147C

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

Preview Lab → · Contrast checker → · Palette generator →

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