#31126F#31126F

#31126F is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.9% C 0.145 H 289.6°. Best body text is #FFFFFF at 14.52:1 contrast (WCAG AA passes).

Color values

HEX#31126F
RGBrgb(49, 18, 111)
HSLhsl(260, 72%, 25%)
HSVhsv(260, 84%, 44%)
CMYKcmyk(55.9%, 83.8%, 0%, 56.5%)
CIE-LABlab(16.67, 38.07, -47.52)
CIE-LCHlch(16.67, 60.88, 308.70°)
OKLaboklab(29.9% 0.0487 -0.1366)
OKLCHoklch(29.9% 0.145 289.6)
XYZxyz(4.3513, 2.2331, 15.2376)
Luminance0.0223 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31126F #506F12
analogous
#12216F #31126F #5F126F
triadic
#31126F #6F3112 #126F31
tetradic
#31126F #6F1221 #506F12 #126F5F
square
#31126F #6F1221 #506F12 #126F5F
split-complementary
#31126F #6F5F12 #216F12
monochromatic
#0C041A #1A093A #31126F #481BA4 #5F23D8

Accessibility & contrast

On white

14.52
#31126F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#31126F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31126F
14.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31126F#FFFFFF#000000##FFFFFF
##31126F1.0014.521.4514.52
#FFFFFF14.521.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B72
Deuteranopia (green-blind)
#00276D
Tritanopia (blue-blind)
#192D41
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #31126f;
/* rgb */ color: rgb(49, 18, 111);
/* oklch */ color: oklch(29.9% 0.145 289.6);
Tailwind
colors: {
  custom: {
    50: '#715599',
    500: '#31126f',
    950: '#000000',
  },
}
SCSS
$custom: #31126f;
$custom-light: #715599;
$custom-dark: #000000;
JSON
{
  "hex": "#31126f",
  "rgb": {
    "r": 49,
    "g": 18,
    "b": 111
  },
  "hsl": {
    "h": 260,
    "s": 72.093,
    "l": 25.294
  },
  "oklch": {
    "l": 0.29898,
    "c": 0.14507,
    "h": 289.6
  },
  "luminance": 0.02233
}

Semantic roles & 50–950 ramp

primary
#31126F
secondary
#81A637
accent
#EF39B2
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #31126F

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

Preview Lab → · Contrast checker → · Palette generator →

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