#331F5D#331F5D

#331F5D is a dark, moderate violet. Relative luminance 0.025; OKLCH L 30.2% C 0.106 H 294.0°. Best body text is #FFFFFF at 14.05:1 contrast (WCAG AA passes).

Color values

HEX#331F5D
RGBrgb(51, 31, 93)
HSLhsl(259, 50%, 24%)
HSVhsv(259, 67%, 36%)
CMYKcmyk(45.2%, 66.7%, 0%, 63.5%)
CIE-LABlab(17.80, 25.73, -33.81)
CIE-LCHlch(17.80, 42.49, 307.27°)
OKLaboklab(30.24% 0.043 -0.0964)
OKLCHoklch(30.24% 0.106 294)
XYZxyz(3.8305, 2.4740, 10.6295)
Luminance0.0247 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F5D #495D1F
analogous
#1F2A5D #331F5D #521F5D
triadic
#331F5D #5D331F #1F5D33
tetradic
#331F5D #5D1F2A #495D1F #1F5D52
square
#331F5D #5D1F2A #495D1F #1F5D52
split-complementary
#331F5D #5D521F #2A5D1F
monochromatic
#0D0817 #1A102F #331F5D #4C2E8B #653EB9

Accessibility & contrast

On white

14.05
#331F5D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#331F5D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F5D
14.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F5D#FFFFFF#000000##FFFFFF
##331F5D1.0014.051.4914.05
#FFFFFF14.051.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C5F
Deuteranopia (green-blind)
#002B5C
Tritanopia (blue-blind)
#282D3A
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #331f5d;
/* rgb */ color: rgb(51, 31, 93);
/* oklch */ color: oklch(30.2% 0.106 294.0);
Tailwind
colors: {
  custom: {
    50: '#6e5c8b',
    500: '#331f5d',
    950: '#000000',
  },
}
SCSS
$custom: #331f5d;
$custom-light: #6e5c8b;
$custom-dark: #000000;
JSON
{
  "hex": "#331f5d",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 93
  },
  "hsl": {
    "h": 259.355,
    "s": 50,
    "l": 24.314
  },
  "oklch": {
    "l": 0.30239,
    "c": 0.10559,
    "h": 294
  },
  "luminance": 0.02474
}

Semantic roles & 50–950 ramp

primary
#331F5D
secondary
#799246
accent
#DA4EAD
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07040C
muted
#7A797D

Preview Lab

Preview with #331F5D

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

Preview Lab → · Contrast checker → · Palette generator →

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