#331F52#331F52

#331F52 is a dark, moderate violet. Relative luminance 0.023; OKLCH L 29.4% C 0.090 H 298.8°. Best body text is #FFFFFF at 14.40:1 contrast (WCAG AA passes).

Color values

HEX#331F52
RGBrgb(51, 31, 82)
HSLhsl(264, 45%, 22%)
HSVhsv(264, 62%, 32%)
CMYKcmyk(37.8%, 62.2%, 0%, 67.8%)
CIE-LABlab(16.95, 22.34, -27.80)
CIE-LCHlch(16.95, 35.66, 308.79°)
OKLaboklab(29.35% 0.0434 -0.0788)
OKLCHoklch(29.35% 0.09 298.8)
XYZxyz(3.3778, 2.2929, 8.2456)
Luminance0.0229 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F52 #3E521F
analogous
#1F2552 #331F52 #4D1F52
triadic
#331F52 #52331F #1F5233
tetradic
#331F52 #521F25 #3E521F #1F524D
square
#331F52 #521F25 #3E521F #1F524D
split-complementary
#331F52 #524D1F #25521F
monochromatic
#0E0816 #170E26 #331F52 #4F307E #6A41AB

Accessibility & contrast

On white

14.40
#331F52 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331F52
14.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F52#FFFFFF#000000##FFFFFF
##331F521.0014.401.4614.40
#FFFFFF14.401.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#072A54
Deuteranopia (green-blind)
#0F2951
Tritanopia (blue-blind)
#2C2935
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #331f52;
/* rgb */ color: rgb(51, 31, 82);
/* oklch */ color: oklch(29.4% 0.090 298.8);
Tailwind
colors: {
  custom: {
    50: '#6d5b83',
    500: '#331f52',
    950: '#000000',
  },
}
SCSS
$custom: #331f52;
$custom-light: #6d5b83;
$custom-dark: #000000;
JSON
{
  "hex": "#331f52",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 82
  },
  "hsl": {
    "h": 263.529,
    "s": 45.133,
    "l": 22.157
  },
  "oklch": {
    "l": 0.29352,
    "c": 0.08991,
    "h": 298.8
  },
  "luminance": 0.02293
}

Semantic roles & 50–950 ramp

primary
#331F52
secondary
#6D8746
accent
#D553A2
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07040A
muted
#7A797C

Preview Lab

Preview with #331F52

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

Preview Lab → · Contrast checker → · Palette generator →

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