#331F6B#331F6B

#331F6B is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.5% C 0.125 H 289.3°. Best body text is #FFFFFF at 13.56:1 contrast (WCAG AA passes).

Color values

HEX#331F6B
RGBrgb(51, 31, 107)
HSLhsl(256, 55%, 27%)
HSVhsv(256, 71%, 42%)
CMYKcmyk(52.3%, 71%, 0%, 58%)
CIE-LABlab(18.99, 30.16, -41.09)
CIE-LCHlch(18.99, 50.97, 306.28°)
OKLaboklab(31.48% 0.0413 -0.1178)
OKLCHoklch(31.48% 0.125 289.3)
XYZxyz(4.5083, 2.7451, 14.1994)
Luminance0.0274 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F6B #576B1F
analogous
#1F316B #331F6B #591F6B
triadic
#331F6B #6B331F #1F6B33
tetradic
#331F6B #6B1F31 #576B1F #1F6B59
square
#331F6B #6B1F31 #576B1F #1F6B59
split-complementary
#331F6B #6B591F #316B1F
monochromatic
#0B0718 #1C113C #331F6B #4A2D9A #623DC7

Accessibility & contrast

On white

13.56
#331F6B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#331F6B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F6B
13.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F6B#FFFFFF#000000##FFFFFF
##331F6B1.0013.561.5513.56
#FFFFFF13.561.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00306D
Deuteranopia (green-blind)
#002C69
Tritanopia (blue-blind)
#203242
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #331f6b;
/* rgb */ color: rgb(51, 31, 107);
/* oklch */ color: oklch(31.5% 0.125 289.3);
Tailwind
colors: {
  custom: {
    50: '#715c96',
    500: '#331f6b',
    950: '#000000',
  },
}
SCSS
$custom: #331f6b;
$custom-light: #715c96;
$custom-dark: #000000;
JSON
{
  "hex": "#331f6b",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 107
  },
  "hsl": {
    "h": 255.789,
    "s": 55.072,
    "l": 27.059
  },
  "oklch": {
    "l": 0.31475,
    "c": 0.12485,
    "h": 289.3
  },
  "luminance": 0.02745
}

Semantic roles & 50–950 ramp

primary
#331F6B
secondary
#889F47
accent
#DE49B7
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040D
muted
#7B797E

Preview Lab

Preview with #331F6B

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

Preview Lab → · Contrast checker → · Palette generator →

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