#310F5C#310F5C

#310F5C is a dark, vivid violet. Relative luminance 0.018; OKLCH L 27.6% C 0.126 H 297.3°. Best body text is #FFFFFF at 15.52:1 contrast (WCAG AA passes).

Color values

HEX#310F5C
RGBrgb(49, 15, 92)
HSLhsl(266, 72%, 21%)
HSVhsv(266, 84%, 36%)
CMYKcmyk(46.7%, 83.7%, 0%, 63.9%)
CIE-LABlab(14.22, 34.00, -38.99)
CIE-LCHlch(14.22, 51.74, 311.09°)
OKLaboklab(27.6% 0.0576 -0.1117)
OKLCHoklch(27.6% 0.126 297.3)
XYZxyz(3.3687, 1.7673, 10.2868)
Luminance0.0177 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#310F5C #3A5C0F
analogous
#0F135C #310F5C #570F5C
triadic
#310F5C #5C310F #0F5C31
tetradic
#310F5C #5C0F13 #3A5C0F #0F5C57
square
#310F5C #5C0F13 #3A5C0F #0F5C57
split-complementary
#310F5C #5C570F #135C0F
monochromatic
#0E041A #150627 #310F5C #4D1891 #6920C5

Accessibility & contrast

On white

15.52
#310F5C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.35
#310F5C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #310F5C
15.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##310F5C#FFFFFF#000000##FFFFFF
##310F5C1.0015.521.3515.52
#FFFFFF15.521.0021.001.00
#0000001.3521.001.0021.00
##FFFFFF15.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00245E
Deuteranopia (green-blind)
#00235B
Tritanopia (blue-blind)
#262435
Achromatopsia (no color)
#242424

Design tokens & code

CSS
--color: #310f5c;
/* rgb */ color: rgb(49, 15, 92);
/* oklch */ color: oklch(27.6% 0.126 297.3);
Tailwind
colors: {
  custom: {
    50: '#6e528b',
    500: '#310f5c',
    950: '#000000',
  },
}
SCSS
$custom: #310f5c;
$custom-light: #6e528b;
$custom-dark: #000000;
JSON
{
  "hex": "#310f5c",
  "rgb": {
    "r": 49,
    "g": 15,
    "b": 92
  },
  "hsl": {
    "h": 266.494,
    "s": 71.963,
    "l": 20.98
  },
  "oklch": {
    "l": 0.27595,
    "c": 0.12567,
    "h": 297.3
  },
  "luminance": 0.01767
}

Semantic roles & 50–950 ramp

primary
#310F5C
secondary
#699531
accent
#EF399F
background
#F6F4F8
surface
#ECE7F0
border
#C7C3CB
text
#08020C
muted
#7B787D

Preview Lab

Preview with #310F5C

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

Preview Lab → · Contrast checker → · Palette generator →

#310F5C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva