#312840#312840

#312840 is a dark, muted violet. Relative luminance 0.025; OKLCH L 29.8% C 0.044 H 301.0°. Best body text is #FFFFFF at 13.92:1 contrast (WCAG AA passes).

Color values

HEX#312840
RGBrgb(49, 40, 64)
HSLhsl(263, 23%, 20%)
HSVhsv(263, 38%, 25%)
CMYKcmyk(23.4%, 37.5%, 0%, 74.9%)
CIE-LABlab(18.10, 10.15, -13.69)
CIE-LCHlch(18.10, 17.05, 306.55°)
OKLaboklab(29.8% 0.0227 -0.0378)
OKLCHoklch(29.8% 0.044 301)
XYZxyz(2.9506, 2.5407, 5.1845)
Luminance0.0254 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312840 #374028
analogous
#282B40 #312840 #3D2840
triadic
#312840 #403128 #284031
tetradic
#312840 #40282B #374028 #28403D
square
#312840 #40282B #374028 #28403D
split-complementary
#312840 #403D28 #2B4028
monochromatic
#0E0C13 #14101A #312840 #4E4066 #6B578B

Accessibility & contrast

On white

13.92
#312840 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#312840 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312840
13.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312840#FFFFFF#000000##FFFFFF
##3128401.0013.921.5113.92
#FFFFFF13.921.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#232C41
Deuteranopia (green-blind)
#242C3F
Tritanopia (blue-blind)
#2E2C31
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #312840;
/* rgb */ color: rgb(49, 40, 64);
/* oklch */ color: oklch(29.8% 0.044 301.0);
Tailwind
colors: {
  custom: {
    50: '#696275',
    500: '#312840',
    950: '#000000',
  },
}
SCSS
$custom: #312840;
$custom-light: #696275;
$custom-dark: #000000;
JSON
{
  "hex": "#312840",
  "rgb": {
    "r": 49,
    "g": 40,
    "b": 64
  },
  "hsl": {
    "h": 262.5,
    "s": 23.077,
    "l": 20.392
  },
  "oklch": {
    "l": 0.29796,
    "c": 0.04413,
    "h": 301
  },
  "luminance": 0.02541
}

Semantic roles & 50–950 ramp

primary
#312840
secondary
#667252
accent
#C0689F
background
#F6F5F7
surface
#EBEAED
border
#C6C6C8
text
#060508
muted
#7A797B

Preview Lab

Preview with #312840

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

Preview Lab → · Contrast checker → · Palette generator →

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