#331F51#331F51

#331F51 is a dark, moderate violet. Relative luminance 0.023; OKLCH L 29.3% C 0.088 H 299.3°. Best body text is #FFFFFF at 14.43:1 contrast (WCAG AA passes).

Color values

HEX#331F51
RGBrgb(51, 31, 81)
HSLhsl(264, 45%, 22%)
HSVhsv(264, 62%, 32%)
CMYKcmyk(37%, 61.7%, 0%, 68.2%)
CIE-LABlab(16.88, 22.04, -27.24)
CIE-LCHlch(16.88, 35.04, 308.98°)
OKLaboklab(29.28% 0.0434 -0.0771)
OKLCHoklch(29.28% 0.088 299.3)
XYZxyz(3.3401, 2.2778, 8.0467)
Luminance0.0228 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F51 #3D511F
analogous
#1F2451 #331F51 #4C1F51
triadic
#331F51 #51331F #1F5133
tetradic
#331F51 #511F24 #3D511F #1F514C
square
#331F51 #511F24 #3D511F #1F514C
split-complementary
#331F51 #514C1F #24511F
monochromatic
#0E0816 #170E25 #331F51 #4F307D #6B41AA

Accessibility & contrast

On white

14.43
#331F51 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#331F51 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F51
14.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F51#FFFFFF#000000##FFFFFF
##331F511.0014.431.4614.43
#FFFFFF14.431.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#092A53
Deuteranopia (green-blind)
#102950
Tritanopia (blue-blind)
#2D2934
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #331f51;
/* rgb */ color: rgb(51, 31, 81);
/* oklch */ color: oklch(29.3% 0.088 299.3);
Tailwind
colors: {
  custom: {
    50: '#6d5b82',
    500: '#331f51',
    950: '#000000',
  },
}
SCSS
$custom: #331f51;
$custom-light: #6d5b82;
$custom-dark: #000000;
JSON
{
  "hex": "#331f51",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 81
  },
  "hsl": {
    "h": 264,
    "s": 44.643,
    "l": 21.961
  },
  "oklch": {
    "l": 0.29275,
    "c": 0.08846,
    "h": 299.3
  },
  "luminance": 0.02278
}

Semantic roles & 50–950 ramp

primary
#331F51
secondary
#6C8646
accent
#D453A1
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07040A
muted
#7A797C

Preview Lab

Preview with #331F51

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

Preview Lab → · Contrast checker → · Palette generator →

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