#31185B#31185B

#31185B is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.7% C 0.113 H 295.5°. Best body text is #FFFFFF at 14.87:1 contrast (WCAG AA passes).

Color values

HEX#31185B
RGBrgb(49, 24, 91)
HSLhsl(262, 58%, 23%)
HSVhsv(262, 74%, 36%)
CMYKcmyk(46.2%, 73.6%, 0%, 64.3%)
CIE-LABlab(15.81, 28.95, -35.73)
CIE-LCHlch(15.81, 45.98, 309.02°)
OKLaboklab(28.69% 0.0486 -0.1021)
OKLCHoklch(28.69% 0.113 295.5)
XYZxyz(3.4811, 2.0615, 10.1100)
Luminance0.0206 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31185B #425B18
analogous
#18205B #31185B #52185B
triadic
#31185B #5B3118 #185B31
tetradic
#31185B #5B1820 #425B18 #185B52
square
#31185B #5B1820 #425B18 #185B52
split-complementary
#31185B #5B5218 #205B18
monochromatic
#0D0618 #170B2B #31185B #4B258B #6532BC

Accessibility & contrast

On white

14.87
#31185B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.41
#31185B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31185B
14.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31185B#FFFFFF#000000##FFFFFF
##31185B1.0014.871.4114.87
#FFFFFF14.871.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00285D
Deuteranopia (green-blind)
#00265A
Tritanopia (blue-blind)
#262837
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #31185b;
/* rgb */ color: rgb(49, 24, 91);
/* oklch */ color: oklch(28.7% 0.113 295.5);
Tailwind
colors: {
  custom: {
    50: '#6e578a',
    500: '#31185b',
    950: '#000000',
  },
}
SCSS
$custom: #31185b;
$custom-light: #6e578a;
$custom-dark: #000000;
JSON
{
  "hex": "#31185b",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 91
  },
  "hsl": {
    "h": 262.388,
    "s": 58.261,
    "l": 22.549
  },
  "oklch": {
    "l": 0.28691,
    "c": 0.11312,
    "h": 295.5
  },
  "luminance": 0.02062
}

Semantic roles & 50–950 ramp

primary
#31185B
secondary
#72923D
accent
#E146A8
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07030C
muted
#7A787D

Preview Lab

Preview with #31185B

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

Preview Lab → · Contrast checker → · Palette generator →

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