#310340#310340

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

Color values

HEX#310340
RGBrgb(49, 3, 64)
HSLhsl(285, 91%, 13%)
HSVhsv(285, 95%, 25%)
CMYKcmyk(23.4%, 95.3%, 0%, 74.9%)
CIE-LABlab(9.71, 32.22, -27.02)
CIE-LCHlch(9.71, 42.05, 320.01°)
OKLaboklab(23.63% 0.0783 -0.0764)
OKLCHoklch(23.63% 0.109 315.7)
XYZxyz(2.2244, 1.0883, 4.9424)
Luminance0.0109 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#310340 #124003
analogous
#120340 #310340 #400330
triadic
#310340 #403103 #034031
tetradic
#310340 #401203 #124003 #033040
square
#310340 #401203 #124003 #033040
split-complementary
#310340 #304003 #034012
monochromatic
#16011D #16011D #310340 #5E067A #8B08B5

Accessibility & contrast

On white

17.25
#310340 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #310340
17.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##310340#FFFFFF#000000##FFFFFF
##3103401.0017.251.2217.25
#FFFFFF17.251.0021.001.00
#0000001.2221.001.0021.00
##FFFFFF17.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001842
Deuteranopia (green-blind)
#011C3F
Tritanopia (blue-blind)
#301222
Achromatopsia (no color)
#1B1B1B

Design tokens & code

CSS
--color: #310340;
/* rgb */ color: rgb(49, 3, 64);
/* oklch */ color: oklch(23.6% 0.109 315.7);
Tailwind
colors: {
  custom: {
    50: '#6c4a75',
    500: '#310340',
    950: '#000000',
  },
}
SCSS
$custom: #310340;
$custom-light: #6c4a75;
$custom-dark: #000000;
JSON
{
  "hex": "#310340",
  "rgb": {
    "r": 49,
    "g": 3,
    "b": 64
  },
  "hsl": {
    "h": 285.246,
    "s": 91.045,
    "l": 13.137
  },
  "oklch": {
    "l": 0.2363,
    "c": 0.10941,
    "h": 315.7
  },
  "luminance": 0.01088
}

Semantic roles & 50–950 ramp

primary
#310340
secondary
#36821D
accent
#FF295D
background
#F6F4F7
surface
#ECE7ED
border
#C7C3C8
text
#070108
muted
#7A777B

Preview Lab

Preview with #310340

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

Preview Lab → · Contrast checker → · Palette generator →

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