#331F58#331F58

#331F58 is a dark, moderate violet. Relative luminance 0.024; OKLCH L 29.8% C 0.099 H 296.1°. Best body text is #FFFFFF at 14.21:1 contrast (WCAG AA passes).

Color values

HEX#331F58
RGBrgb(51, 31, 88)
HSLhsl(261, 48%, 23%)
HSVhsv(261, 65%, 35%)
CMYKcmyk(42%, 64.8%, 0%, 65.5%)
CIE-LABlab(17.41, 24.18, -31.11)
CIE-LCHlch(17.41, 39.40, 307.85°)
OKLaboklab(29.83% 0.0433 -0.0885)
OKLCHoklch(29.83% 0.099 296.1)
XYZxyz(3.6162, 2.3883, 9.5011)
Luminance0.0239 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F58 #44581F
analogous
#1F2758 #331F58 #4F1F58
triadic
#331F58 #58331F #1F5833
tetradic
#331F58 #581F27 #44581F #1F584F
square
#331F58 #581F27 #44581F #1F584F
split-complementary
#331F58 #584F1F #27581F
monochromatic
#0D0817 #190F2B #331F58 #4D2F85 #673FB3

Accessibility & contrast

On white

14.21
#331F58 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.48
#331F58 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F58
14.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F58#FFFFFF#000000##FFFFFF
##331F581.0014.211.4814.21
#FFFFFF14.211.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B5A
Deuteranopia (green-blind)
#062A57
Tritanopia (blue-blind)
#2A2B38
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #331f58;
/* rgb */ color: rgb(51, 31, 88);
/* oklch */ color: oklch(29.8% 0.099 296.1);
Tailwind
colors: {
  custom: {
    50: '#6e5b88',
    500: '#331f58',
    950: '#000000',
  },
}
SCSS
$custom: #331f58;
$custom-light: #6e5b88;
$custom-dark: #000000;
JSON
{
  "hex": "#331f58",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 88
  },
  "hsl": {
    "h": 261.053,
    "s": 47.899,
    "l": 23.333
  },
  "oklch": {
    "l": 0.29826,
    "c": 0.09851,
    "h": 296.1
  },
  "luminance": 0.02388
}

Semantic roles & 50–950 ramp

primary
#331F58
secondary
#748D46
accent
#D750A8
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07040B
muted
#7A797C

Preview Lab

Preview with #331F58

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

Preview Lab → · Contrast checker → · Palette generator →

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