#310540#310540

#310540 is a very dark, moderate purple. Relative luminance 0.011; OKLCH L 23.9% C 0.107 H 315.4°. Best body text is #FFFFFF at 17.12:1 contrast (WCAG AA passes).

Color values

HEX#310540
RGBrgb(49, 5, 64)
HSLhsl(285, 86%, 14%)
HSVhsv(285, 92%, 25%)
CMYKcmyk(23.4%, 92.2%, 0%, 74.9%)
CIE-LABlab(10.04, 31.22, -26.47)
CIE-LCHlch(10.04, 40.94, 319.71°)
OKLaboklab(23.87% 0.0759 -0.0748)
OKLCHoklch(23.87% 0.107 315.4)
XYZxyz(2.2462, 1.1318, 4.9496)
Luminance0.0113 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#310540 #144005
analogous
#130540 #310540 #400531
triadic
#310540 #403105 #054031
tetradic
#310540 #401305 #144005 #053140
square
#310540 #401305 #144005 #053140
split-complementary
#310540 #314005 #054013
monochromatic
#16021C #16021C #310540 #5C0979 #880EB2

Accessibility & contrast

On white

17.12
#310540 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.23
#310540 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #310540
17.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##310540#FFFFFF#000000##FFFFFF
##3105401.0017.121.2317.12
#FFFFFF17.121.0021.001.00
#0000001.2321.001.0021.00
##FFFFFF17.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001942
Deuteranopia (green-blind)
#031D3F
Tritanopia (blue-blind)
#301323
Achromatopsia (no color)
#1C1C1C

Design tokens & code

CSS
--color: #310540;
/* rgb */ color: rgb(49, 5, 64);
/* oklch */ color: oklch(23.9% 0.107 315.4);
Tailwind
colors: {
  custom: {
    50: '#6c4b75',
    500: '#310540',
    950: '#000000',
  },
}
SCSS
$custom: #310540;
$custom-light: #6c4b75;
$custom-dark: #000000;
JSON
{
  "hex": "#310540",
  "rgb": {
    "r": 49,
    "g": 5,
    "b": 64
  },
  "hsl": {
    "h": 284.746,
    "s": 85.507,
    "l": 13.529
  },
  "oklch": {
    "l": 0.23865,
    "c": 0.10653,
    "h": 315.4
  },
  "luminance": 0.01132
}

Semantic roles & 50–950 ramp

primary
#310540
secondary
#398120
accent
#FC2C61
background
#F6F4F7
surface
#ECE7ED
border
#C7C3C8
text
#070108
muted
#7A777B

Preview Lab

Preview with #310540

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

Preview Lab → · Contrast checker → · Palette generator →

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