#331F57#331F57

#331F57 is a dark, moderate violet. Relative luminance 0.024; OKLCH L 29.7% C 0.097 H 296.5°. Best body text is #FFFFFF at 14.24:1 contrast (WCAG AA passes).

Color values

HEX#331F57
RGBrgb(51, 31, 87)
HSLhsl(261, 47%, 23%)
HSVhsv(261, 64%, 34%)
CMYKcmyk(41.4%, 64.4%, 0%, 65.9%)
CIE-LABlab(17.33, 23.87, -30.57)
CIE-LCHlch(17.33, 38.78, 307.99°)
OKLaboklab(29.74% 0.0433 -0.0869)
OKLCHoklch(29.74% 0.097 296.5)
XYZxyz(3.5751, 2.3718, 9.2844)
Luminance0.0237 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F57 #43571F
analogous
#1F2757 #331F57 #4F1F57
triadic
#331F57 #57331F #1F5733
tetradic
#331F57 #571F27 #43571F #1F574F
square
#331F57 #571F27 #43571F #1F574F
split-complementary
#331F57 #574F1F #27571F
monochromatic
#0D0817 #190F2A #331F57 #4D2F84 #683FB1

Accessibility & contrast

On white

14.24
#331F57 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#331F57 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F57
14.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F57#FFFFFF#000000##FFFFFF
##331F571.0014.241.4714.24
#FFFFFF14.241.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B59
Deuteranopia (green-blind)
#072A56
Tritanopia (blue-blind)
#2A2B37
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #331f57;
/* rgb */ color: rgb(51, 31, 87);
/* oklch */ color: oklch(29.7% 0.097 296.5);
Tailwind
colors: {
  custom: {
    50: '#6e5b87',
    500: '#331f57',
    950: '#000000',
  },
}
SCSS
$custom: #331f57;
$custom-light: #6e5b87;
$custom-dark: #000000;
JSON
{
  "hex": "#331f57",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 87
  },
  "hsl": {
    "h": 261.429,
    "s": 47.458,
    "l": 23.137
  },
  "oklch": {
    "l": 0.29745,
    "c": 0.09709,
    "h": 296.5
  },
  "luminance": 0.02372
}

Semantic roles & 50–950 ramp

primary
#331F57
secondary
#738C46
accent
#D751A7
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07040B
muted
#7A797C

Preview Lab

Preview with #331F57

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

Preview Lab → · Contrast checker → · Palette generator →

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