#31125B#31125B

#31125B is a dark, vivid violet. Relative luminance 0.018; OKLCH L 27.9% C 0.121 H 297.1°. Best body text is #FFFFFF at 15.35:1 contrast (WCAG AA passes).

Color values

HEX#31125B
RGBrgb(49, 18, 91)
HSLhsl(265, 67%, 21%)
HSVhsv(265, 80%, 36%)
CMYKcmyk(46.2%, 80.2%, 0%, 64.3%)
CIE-LABlab(14.63, 32.25, -37.65)
CIE-LCHlch(14.63, 49.57, 310.59°)
OKLaboklab(27.86% 0.0551 -0.1077)
OKLCHoklch(27.86% 0.121 297.1)
XYZxyz(3.3708, 1.8408, 10.0732)
Luminance0.0184 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31125B #3C5B12
analogous
#12185B #31125B #56125B
triadic
#31125B #5B3112 #125B31
tetradic
#31125B #5B1218 #3C5B12 #125B56
square
#31125B #5B1218 #3C5B12 #125B56
split-complementary
#31125B #5B5612 #185B12
monochromatic
#0E051A #150828 #31125B #4D1C8E #6826C1

Accessibility & contrast

On white

15.35
#31125B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.37
#31125B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31125B
15.35:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31125B#FFFFFF#000000##FFFFFF
##31125B1.0015.351.3715.35
#FFFFFF15.351.0021.001.00
#0000001.3721.001.0021.00
##FFFFFF15.351.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00255D
Deuteranopia (green-blind)
#00245A
Tritanopia (blue-blind)
#262535
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #31125b;
/* rgb */ color: rgb(49, 18, 91);
/* oklch */ color: oklch(27.9% 0.121 297.1);
Tailwind
colors: {
  custom: {
    50: '#6e538a',
    500: '#31125b',
    950: '#000000',
  },
}
SCSS
$custom: #31125b;
$custom-light: #6e538a;
$custom-dark: #000000;
JSON
{
  "hex": "#31125b",
  "rgb": {
    "r": 49,
    "g": 18,
    "b": 91
  },
  "hsl": {
    "h": 265.479,
    "s": 66.972,
    "l": 21.373
  },
  "oklch": {
    "l": 0.27855,
    "c": 0.12102,
    "h": 297.1
  },
  "luminance": 0.01841
}

Semantic roles & 50–950 ramp

primary
#31125B
secondary
#6B9335
accent
#EA3EA1
background
#F6F4F8
surface
#ECE7F0
border
#C7C3CB
text
#08030C
muted
#7B787D

Preview Lab

Preview with #31125B

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

Preview Lab → · Contrast checker → · Palette generator →

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