#31126A#31126A

#31126A is a dark, vivid violet. Relative luminance 0.021; OKLCH L 29.4% C 0.139 H 291.3°. Best body text is #FFFFFF at 14.73:1 contrast (WCAG AA passes).

Color values

HEX#31126A
RGBrgb(49, 18, 106)
HSLhsl(261, 71%, 24%)
HSVhsv(261, 83%, 42%)
CMYKcmyk(53.8%, 83%, 0%, 58.4%)
CIE-LABlab(16.14, 36.61, -45.13)
CIE-LCHlch(16.14, 58.11, 309.05°)
OKLaboklab(29.37% 0.0504 -0.1297)
OKLCHoklch(29.37% 0.139 291.3)
XYZxyz(4.0837, 2.1260, 13.8281)
Luminance0.0213 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31126A #4B6A12
analogous
#121F6A #31126A #5D126A
triadic
#31126A #6A3112 #126A31
tetradic
#31126A #6A121F #4B6A12 #126A5D
square
#31126A #6A121F #4B6A12 #126A5D
split-complementary
#31126A #6A5D12 #1F6A12
monochromatic
#0C041A #190936 #31126A #491B9E #6124D3

Accessibility & contrast

On white

14.73
#31126A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#31126A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31126A
14.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31126A#FFFFFF#000000##FFFFFF
##31126A1.0014.731.4314.73
#FFFFFF14.731.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00296C
Deuteranopia (green-blind)
#002668
Tritanopia (blue-blind)
#1D2B3E
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #31126a;
/* rgb */ color: rgb(49, 18, 106);
/* oklch */ color: oklch(29.4% 0.139 291.3);
Tailwind
colors: {
  custom: {
    50: '#705496',
    500: '#31126a',
    950: '#000000',
  },
}
SCSS
$custom: #31126a;
$custom-light: #705496;
$custom-dark: #000000;
JSON
{
  "hex": "#31126a",
  "rgb": {
    "r": 49,
    "g": 18,
    "b": 106
  },
  "hsl": {
    "h": 261.136,
    "s": 70.968,
    "l": 24.314
  },
  "oklch": {
    "l": 0.29369,
    "c": 0.13912,
    "h": 291.3
  },
  "luminance": 0.02126
}

Semantic roles & 50–950 ramp

primary
#31126A
secondary
#7CA236
accent
#EE3AAE
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030D
muted
#7B787E

Preview Lab

Preview with #31126A

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

Preview Lab → · Contrast checker → · Palette generator →

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