#331D5C#331D5C

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

Color values

HEX#331D5C
RGBrgb(51, 29, 92)
HSLhsl(261, 52%, 24%)
HSVhsv(261, 68%, 36%)
CMYKcmyk(44.6%, 68.5%, 0%, 63.9%)
CIE-LABlab(17.25, 26.68, -34.04)
CIE-LCHlch(17.25, 43.25, 308.09°)
OKLaboklab(29.81% 0.0456 -0.0971)
OKLCHoklch(29.81% 0.107 295.2)
XYZxyz(3.7359, 2.3552, 10.3809)
Luminance0.0236 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D5C #465C1D
analogous
#1D265C #331D5C #521D5C
triadic
#331D5C #5C331D #1D5C33
tetradic
#331D5C #5C1D26 #465C1D #1D5C52
square
#331D5C #5C1D26 #465C1D #1D5C52
split-complementary
#331D5C #5C521D #265C1D
monochromatic
#0D0717 #190E2D #331D5C #4D2C8B #673AB9

Accessibility & contrast

On white

14.28
#331D5C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331D5C
14.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D5C#FFFFFF#000000##FFFFFF
##331D5C1.0014.281.4714.28
#FFFFFF14.281.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B5E
Deuteranopia (green-blind)
#00295B
Tritanopia (blue-blind)
#282B39
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #331d5c;
/* rgb */ color: rgb(51, 29, 92);
/* oklch */ color: oklch(29.8% 0.107 295.2);
Tailwind
colors: {
  custom: {
    50: '#6f5a8b',
    500: '#331d5c',
    950: '#000000',
  },
}
SCSS
$custom: #331d5c;
$custom-light: #6f5a8b;
$custom-dark: #000000;
JSON
{
  "hex": "#331d5c",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 92
  },
  "hsl": {
    "h": 260.952,
    "s": 52.066,
    "l": 23.725
  },
  "oklch": {
    "l": 0.29814,
    "c": 0.10728,
    "h": 295.2
  },
  "luminance": 0.02355
}

Semantic roles & 50–950 ramp

primary
#331D5C
secondary
#769144
accent
#DC4CA9
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07040C
muted
#7A797D

Preview Lab

Preview with #331D5C

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

Preview Lab → · Contrast checker → · Palette generator →

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