#31125A#31125A

#31125A is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.8% C 0.120 H 297.5°. Best body text is #FFFFFF at 15.39:1 contrast (WCAG AA passes).

Color values

HEX#31125A
RGBrgb(49, 18, 90)
HSLhsl(266, 67%, 21%)
HSVhsv(266, 80%, 35%)
CMYKcmyk(45.6%, 80%, 0%, 64.7%)
CIE-LABlab(14.53, 31.96, -37.13)
CIE-LCHlch(14.53, 48.99, 310.72°)
OKLaboklab(27.76% 0.0554 -0.1062)
OKLCHoklch(27.76% 0.12 297.5)
XYZxyz(3.3279, 1.8237, 9.8476)
Luminance0.0182 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31125A #3B5A12
analogous
#12175A #31125A #55125A
triadic
#31125A #5A3112 #125A31
tetradic
#31125A #5A1217 #3B5A12 #125A55
square
#31125A #5A1217 #3B5A12 #125A55
split-complementary
#31125A #5A5512 #175A12
monochromatic
#0E051A #150827 #31125A #4D1C8D #6926C0

Accessibility & contrast

On white

15.39
#31125A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.36
#31125A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31125A
15.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31125A#FFFFFF#000000##FFFFFF
##31125A1.0015.391.3615.39
#FFFFFF15.391.0021.001.00
#0000001.3621.001.0021.00
##FFFFFF15.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00255C
Deuteranopia (green-blind)
#002459
Tritanopia (blue-blind)
#262535
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #31125a;
/* rgb */ color: rgb(49, 18, 90);
/* oklch */ color: oklch(27.8% 0.120 297.5);
Tailwind
colors: {
  custom: {
    50: '#6e5389',
    500: '#31125a',
    950: '#000000',
  },
}
SCSS
$custom: #31125a;
$custom-light: #6e5389;
$custom-dark: #000000;
JSON
{
  "hex": "#31125a",
  "rgb": {
    "r": 49,
    "g": 18,
    "b": 90
  },
  "hsl": {
    "h": 265.833,
    "s": 66.667,
    "l": 21.176
  },
  "oklch": {
    "l": 0.27759,
    "c": 0.11979,
    "h": 297.5
  },
  "luminance": 0.01824
}

Semantic roles & 50–950 ramp

primary
#31125A
secondary
#6A9335
accent
#EA3EA0
background
#F6F4F8
surface
#ECE7F0
border
#C7C3CB
text
#07030C
muted
#7A787D

Preview Lab

Preview with #31125A

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

Preview Lab → · Contrast checker → · Palette generator →

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