#331F6D#331F6D

#331F6D is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.7% C 0.128 H 288.7°. Best body text is #FFFFFF at 13.48:1 contrast (WCAG AA passes).

Color values

HEX#331F6D
RGBrgb(51, 31, 109)
HSLhsl(255, 56%, 27%)
HSVhsv(255, 72%, 43%)
CMYKcmyk(53.2%, 71.6%, 0%, 57.3%)
CIE-LABlab(19.17, 30.80, -42.10)
CIE-LCHlch(19.17, 52.16, 306.19°)
OKLaboklab(31.66% 0.0409 -0.1208)
OKLCHoklch(31.66% 0.128 288.7)
XYZxyz(4.6147, 2.7877, 14.7600)
Luminance0.0279 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F6D #596D1F
analogous
#1F326D #331F6D #5A1F6D
triadic
#331F6D #6D331F #1F6D33
tetradic
#331F6D #6D1F32 #596D1F #1F6D5A
square
#331F6D #6D1F32 #596D1F #1F6D5A
split-complementary
#331F6D #6D5A1F #326D1F
monochromatic
#0B0718 #1D113D #331F6D #492D9D #623EC8

Accessibility & contrast

On white

13.48
#331F6D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#331F6D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F6D
13.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F6D#FFFFFF#000000##FFFFFF
##331F6D1.0013.481.5613.48
#FFFFFF13.481.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00306F
Deuteranopia (green-blind)
#002D6B
Tritanopia (blue-blind)
#1E3343
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331f6d;
/* rgb */ color: rgb(51, 31, 109);
/* oklch */ color: oklch(31.7% 0.128 288.7);
Tailwind
colors: {
  custom: {
    50: '#715c98',
    500: '#331f6d',
    950: '#000000',
  },
}
SCSS
$custom: #331f6d;
$custom-light: #715c98;
$custom-dark: #000000;
JSON
{
  "hex": "#331f6d",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 109
  },
  "hsl": {
    "h": 255.385,
    "s": 55.714,
    "l": 27.451
  },
  "oklch": {
    "l": 0.3166,
    "c": 0.12753,
    "h": 288.7
  },
  "luminance": 0.02788
}

Semantic roles & 50–950 ramp

primary
#331F6D
secondary
#8AA147
accent
#DF49B8
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #331F6D

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

Preview Lab → · Contrast checker → · Palette generator →

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