#331D62#331D62

#331D62 is a dark, moderate violet. Relative luminance 0.025; OKLCH L 30.3% C 0.115 H 292.9°. Best body text is #FFFFFF at 14.07:1 contrast (WCAG AA passes).

Color values

HEX#331D62
RGBrgb(51, 29, 98)
HSLhsl(259, 54%, 25%)
HSVhsv(259, 70%, 38%)
CMYKcmyk(48%, 70.4%, 0%, 61.6%)
CIE-LABlab(17.76, 28.54, -37.20)
CIE-LCHlch(17.76, 46.89, 307.50°)
OKLaboklab(30.34% 0.0449 -0.1064)
OKLCHoklch(30.34% 0.115 292.9)
XYZxyz(4.0086, 2.4643, 11.8173)
Luminance0.0246 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D62 #4C621D
analogous
#1D2A62 #331D62 #551D62
triadic
#331D62 #62331D #1D6233
tetradic
#331D62 #621D2A #4C621D #1D6255
square
#331D62 #621D2A #4C621D #1D6255
split-complementary
#331D62 #62551D #2A621D
monochromatic
#0C0718 #1A0F33 #331D62 #4C2B91 #6439C0

Accessibility & contrast

On white

14.07
#331D62 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#331D62 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D62
14.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D62#FFFFFF#000000##FFFFFF
##331D621.0014.071.4914.07
#FFFFFF14.071.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C64
Deuteranopia (green-blind)
#002A61
Tritanopia (blue-blind)
#252E3C
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #331d62;
/* rgb */ color: rgb(51, 29, 98);
/* oklch */ color: oklch(30.3% 0.115 292.9);
Tailwind
colors: {
  custom: {
    50: '#6f5a8f',
    500: '#331d62',
    950: '#000000',
  },
}
SCSS
$custom: #331d62;
$custom-light: #6f5a8f;
$custom-dark: #000000;
JSON
{
  "hex": "#331d62",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 98
  },
  "hsl": {
    "h": 259.13,
    "s": 54.331,
    "l": 24.902
  },
  "oklch": {
    "l": 0.30338,
    "c": 0.11548,
    "h": 292.9
  },
  "luminance": 0.02464
}

Semantic roles & 50–950 ramp

primary
#331D62
secondary
#7C9744
accent
#DE4AAF
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#08040C
muted
#7B797D

Preview Lab

Preview with #331D62

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

Preview Lab → · Contrast checker → · Palette generator →

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