#331D5F#331D5F

#331D5F is a dark, moderate violet. Relative luminance 0.024; OKLCH L 30.1% C 0.111 H 294.0°. Best body text is #FFFFFF at 14.17:1 contrast (WCAG AA passes).

Color values

HEX#331D5F
RGBrgb(51, 29, 95)
HSLhsl(260, 53%, 24%)
HSVhsv(260, 69%, 37%)
CMYKcmyk(46.3%, 69.5%, 0%, 62.7%)
CIE-LABlab(17.50, 27.61, -35.63)
CIE-LCHlch(17.50, 45.07, 307.77°)
OKLaboklab(30.07% 0.0453 -0.1018)
OKLCHoklch(30.07% 0.111 294)
XYZxyz(3.8696, 2.4087, 11.0853)
Luminance0.0241 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D5F #495F1D
analogous
#1D285F #331D5F #541D5F
triadic
#331D5F #5F331D #1D5F33
tetradic
#331D5F #5F1D28 #495F1D #1D5F54
square
#331D5F #5F1D28 #495F1D #1D5F54
split-complementary
#331D5F #5F541D #285F1D
monochromatic
#0D0717 #1A0F30 #331D5F #4C2B8E #653ABD

Accessibility & contrast

On white

14.17
#331D5F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.48
#331D5F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D5F
14.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D5F#FFFFFF#000000##FFFFFF
##331D5F1.0014.171.4814.17
#FFFFFF14.171.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C61
Deuteranopia (green-blind)
#002A5E
Tritanopia (blue-blind)
#272D3B
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #331d5f;
/* rgb */ color: rgb(51, 29, 95);
/* oklch */ color: oklch(30.1% 0.111 294.0);
Tailwind
colors: {
  custom: {
    50: '#6f5a8d',
    500: '#331d5f',
    950: '#000000',
  },
}
SCSS
$custom: #331d5f;
$custom-light: #6f5a8d;
$custom-dark: #000000;
JSON
{
  "hex": "#331d5f",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 95
  },
  "hsl": {
    "h": 260,
    "s": 53.226,
    "l": 24.314
  },
  "oklch": {
    "l": 0.30074,
    "c": 0.1114,
    "h": 294
  },
  "luminance": 0.02409
}

Semantic roles & 50–950 ramp

primary
#331D5F
secondary
#799444
accent
#DD4BAC
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#08040C
muted
#7B797D

Preview Lab

Preview with #331D5F

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

Preview Lab → · Contrast checker → · Palette generator →

#331D5F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva