#310838#310838

#310838 is a very dark, moderate purple. Relative luminance 0.011; OKLCH L 23.6% C 0.094 H 321.4°. Best body text is #FFFFFF at 17.18:1 contrast (WCAG AA passes).

Color values

HEX#310838
RGBrgb(49, 8, 56)
HSLhsl(291, 75%, 13%)
HSVhsv(291, 86%, 22%)
CMYKcmyk(12.5%, 85.7%, 0%, 78%)
CIE-LABlab(9.89, 27.96, -20.98)
CIE-LCHlch(9.89, 34.95, 323.11°)
OKLaboklab(23.55% 0.0735 -0.0587)
OKLCHoklch(23.55% 0.094 321.4)
XYZxyz(2.0672, 1.1123, 3.8464)
Luminance0.0111 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#310838 #0F3808
analogous
#190838 #310838 #380827
triadic
#310838 #383108 #083831
tetradic
#310838 #381908 #0F3808 #082738
square
#310838 #381908 #0F3808 #082738
split-complementary
#310838 #273808 #083819
monochromatic
#17041B #17041B #310838 #60106E #8F17A3

Accessibility & contrast

On white

17.18
#310838 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.22
#310838 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #310838
17.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##310838#FFFFFF#000000##FFFFFF
##3108381.0017.181.2217.18
#FFFFFF17.181.0021.001.00
#0000001.2221.001.0021.00
##FFFFFF17.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001839
Deuteranopia (green-blind)
#0E1D37
Tritanopia (blue-blind)
#32111F
Achromatopsia (no color)
#1B1B1B

Design tokens & code

CSS
--color: #310838;
/* rgb */ color: rgb(49, 8, 56);
/* oklch */ color: oklch(23.6% 0.094 321.4);
Tailwind
colors: {
  custom: {
    50: '#6b4c6f',
    500: '#310838',
    950: '#000000',
  },
}
SCSS
$custom: #310838;
$custom-light: #6b4c6f;
$custom-dark: #000000;
JSON
{
  "hex": "#310838",
  "rgb": {
    "r": 49,
    "g": 8,
    "b": 56
  },
  "hsl": {
    "h": 291.25,
    "s": 75,
    "l": 12.549
  },
  "oklch": {
    "l": 0.23552,
    "c": 0.09406,
    "h": 321.4
  },
  "luminance": 0.01112
}

Semantic roles & 50–950 ramp

primary
#310838
secondary
#317725
accent
#F23652
background
#F6F4F6
surface
#EBE7EC
border
#C6C3C7
text
#070107
muted
#7A777A

Preview Lab

Preview with #310838

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

Preview Lab → · Contrast checker → · Palette generator →

#310838 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva