#331F5F#331F5F

#331F5F is a dark, moderate violet. Relative luminance 0.025; OKLCH L 30.4% C 0.108 H 293.3°. Best body text is #FFFFFF at 13.98:1 contrast (WCAG AA passes).

Color values

HEX#331F5F
RGBrgb(51, 31, 95)
HSLhsl(259, 51%, 25%)
HSVhsv(259, 67%, 37%)
CMYKcmyk(46.3%, 67.4%, 0%, 62.7%)
CIE-LABlab(17.96, 26.36, -34.88)
CIE-LCHlch(17.96, 43.72, 307.08°)
OKLaboklab(30.41% 0.0428 -0.0996)
OKLCHoklch(30.41% 0.108 293.3)
XYZxyz(3.9202, 2.5099, 11.1022)
Luminance0.0251 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F5F #4B5F1F
analogous
#1F2B5F #331F5F #531F5F
triadic
#331F5F #5F331F #1F5F33
tetradic
#331F5F #5F1F2B #4B5F1F #1F5F53
square
#331F5F #5F1F2B #4B5F1F #1F5F53
split-complementary
#331F5F #5F531F #2B5F1F
monochromatic
#0C0817 #1A1031 #331F5F #4C2E8D #653DBB

Accessibility & contrast

On white

13.98
#331F5F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.50
#331F5F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F5F
13.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F5F#FFFFFF#000000##FFFFFF
##331F5F1.0013.981.5013.98
#FFFFFF13.981.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF13.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D61
Deuteranopia (green-blind)
#002B5E
Tritanopia (blue-blind)
#272E3B
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #331f5f;
/* rgb */ color: rgb(51, 31, 95);
/* oklch */ color: oklch(30.4% 0.108 293.3);
Tailwind
colors: {
  custom: {
    50: '#6f5c8d',
    500: '#331f5f',
    950: '#000000',
  },
}
SCSS
$custom: #331f5f;
$custom-light: #6f5c8d;
$custom-dark: #000000;
JSON
{
  "hex": "#331f5f",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 95
  },
  "hsl": {
    "h": 258.75,
    "s": 50.794,
    "l": 24.706
  },
  "oklch": {
    "l": 0.30409,
    "c": 0.10839,
    "h": 293.3
  },
  "luminance": 0.0251
}

Semantic roles & 50–950 ramp

primary
#331F5F
secondary
#7B9446
accent
#DA4EAE
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#08040C
muted
#7B797D

Preview Lab

Preview with #331F5F

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

Preview Lab → · Contrast checker → · Palette generator →

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