#331E52#331E52

#331E52 is a dark, moderate violet. Relative luminance 0.022; OKLCH L 29.2% C 0.092 H 299.3°. Best body text is #FFFFFF at 14.50:1 contrast (WCAG AA passes).

Color values

HEX#331E52
RGBrgb(51, 30, 82)
HSLhsl(264, 46%, 22%)
HSVhsv(264, 63%, 32%)
CMYKcmyk(37.8%, 63.4%, 0%, 67.8%)
CIE-LABlab(16.71, 22.99, -28.20)
CIE-LCHlch(16.71, 36.38, 309.20°)
OKLaboklab(29.17% 0.0448 -0.0799)
OKLCHoklch(29.17% 0.092 299.3)
XYZxyz(3.3521, 2.2415, 8.2371)
Luminance0.0224 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E52 #3D521E
analogous
#1E2352 #331E52 #4D1E52
triadic
#331E52 #52331E #1E5233
tetradic
#331E52 #521E23 #3D521E #1E524D
square
#331E52 #521E23 #3D521E #1E524D
split-complementary
#331E52 #524D1E #23521E
monochromatic
#0E0816 #170E25 #331E52 #4F2E7F #6B3FAC

Accessibility & contrast

On white

14.50
#331E52 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#331E52 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331E52
14.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E52#FFFFFF#000000##FFFFFF
##331E521.0014.501.4514.50
#FFFFFF14.501.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#052954
Deuteranopia (green-blind)
#0D2951
Tritanopia (blue-blind)
#2C2934
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #331e52;
/* rgb */ color: rgb(51, 30, 82);
/* oklch */ color: oklch(29.2% 0.092 299.3);
Tailwind
colors: {
  custom: {
    50: '#6d5b83',
    500: '#331e52',
    950: '#000000',
  },
}
SCSS
$custom: #331e52;
$custom-light: #6d5b83;
$custom-dark: #000000;
JSON
{
  "hex": "#331e52",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 82
  },
  "hsl": {
    "h": 264.231,
    "s": 46.429,
    "l": 21.961
  },
  "oklch": {
    "l": 0.29169,
    "c": 0.09164,
    "h": 299.3
  },
  "luminance": 0.02242
}

Semantic roles & 50–950 ramp

primary
#331E52
secondary
#6C8745
accent
#D652A1
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07040A
muted
#7A797C

Preview Lab

Preview with #331E52

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

Preview Lab → · Contrast checker → · Palette generator →

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