#331C52#331C52

#331C52 is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.8% C 0.095 H 300.1°. Best body text is #FFFFFF at 14.70:1 contrast (WCAG AA passes).

Color values

HEX#331C52
RGBrgb(51, 28, 82)
HSLhsl(266, 49%, 22%)
HSVhsv(266, 66%, 32%)
CMYKcmyk(37.8%, 65.9%, 0%, 67.8%)
CIE-LABlab(16.22, 24.27, -28.97)
CIE-LCHlch(16.22, 37.80, 309.96°)
OKLaboklab(28.82% 0.0477 -0.0822)
OKLCHoklch(28.82% 0.095 300.1)
XYZxyz(3.3031, 2.1435, 8.2207)
Luminance0.0214 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331C52 #3B521C
analogous
#1C2052 #331C52 #4E1C52
triadic
#331C52 #52331C #1C5233
tetradic
#331C52 #521C20 #3B521C #1C524E
square
#331C52 #521C20 #3B521C #1C524E
split-complementary
#331C52 #524E1C #20521C
monochromatic
#0E0817 #170C24 #331C52 #4F2C80 #6C3BAD

Accessibility & contrast

On white

14.70
#331C52 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#331C52 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331C52
14.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331C52#FFFFFF#000000##FFFFFF
##331C521.0014.701.4314.70
#FFFFFF14.701.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002854
Deuteranopia (green-blind)
#0A2851
Tritanopia (blue-blind)
#2C2734
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331c52;
/* rgb */ color: rgb(51, 28, 82);
/* oklch */ color: oklch(28.8% 0.095 300.1);
Tailwind
colors: {
  custom: {
    50: '#6d5983',
    500: '#331c52',
    950: '#000000',
  },
}
SCSS
$custom: #331c52;
$custom-light: #6d5983;
$custom-dark: #000000;
JSON
{
  "hex": "#331c52",
  "rgb": {
    "r": 51,
    "g": 28,
    "b": 82
  },
  "hsl": {
    "h": 265.556,
    "s": 49.091,
    "l": 21.569
  },
  "oklch": {
    "l": 0.28816,
    "c": 0.09503,
    "h": 300.1
  },
  "luminance": 0.02144
}

Semantic roles & 50–950 ramp

primary
#331C52
secondary
#6A8842
accent
#D94F9E
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07030A
muted
#7A787C

Preview Lab

Preview with #331C52

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

Preview Lab → · Contrast checker → · Palette generator →

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