#331F6F#331F6F

#331F6F is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.8% C 0.130 H 288.1°. Best body text is #FFFFFF at 13.41:1 contrast (WCAG AA passes).

Color values

HEX#331F6F
RGBrgb(51, 31, 111)
HSLhsl(255, 56%, 28%)
HSVhsv(255, 72%, 44%)
CMYKcmyk(54.1%, 72.1%, 0%, 56.5%)
CIE-LABlab(19.36, 31.44, -43.10)
CIE-LCHlch(19.36, 53.34, 306.11°)
OKLaboklab(31.85% 0.0406 -0.1237)
OKLCHoklch(31.85% 0.13 288.1)
XYZxyz(4.7236, 2.8313, 15.3334)
Luminance0.0283 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F6F #5B6F1F
analogous
#1F336F #331F6F #5B1F6F
triadic
#331F6F #6F331F #1F6F33
tetradic
#331F6F #6F1F33 #5B6F1F #1F6F5B
square
#331F6F #6F1F33 #5B6F1F #1F6F5B
split-complementary
#331F6F #6F5B1F #336F1F
monochromatic
#0B0718 #1D123F #331F6F #492C9F #623FC9

Accessibility & contrast

On white

13.41
#331F6F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#331F6F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F6F
13.41:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F6F#FFFFFF#000000##FFFFFF
##331F6F1.0013.411.5713.41
#FFFFFF13.411.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.411.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003171
Deuteranopia (green-blind)
#002D6D
Tritanopia (blue-blind)
#1D3344
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331f6f;
/* rgb */ color: rgb(51, 31, 111);
/* oklch */ color: oklch(31.8% 0.130 288.1);
Tailwind
colors: {
  custom: {
    50: '#715c99',
    500: '#331f6f',
    950: '#000000',
  },
}
SCSS
$custom: #331f6f;
$custom-light: #715c99;
$custom-dark: #000000;
JSON
{
  "hex": "#331f6f",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 111
  },
  "hsl": {
    "h": 255,
    "s": 56.338,
    "l": 27.843
  },
  "oklch": {
    "l": 0.31847,
    "c": 0.13021,
    "h": 288.1
  },
  "luminance": 0.02831
}

Semantic roles & 50–950 ramp

primary
#331F6F
secondary
#8CA347
accent
#E048BA
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #331F6F

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

Preview Lab → · Contrast checker → · Palette generator →

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