#331D7B#331D7B

#331D7B is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.7% C 0.148 H 285.6°. Best body text is #FFFFFF at 13.10:1 contrast (WCAG AA passes).

Color values

HEX#331D7B
RGBrgb(51, 29, 123)
HSLhsl(254, 62%, 30%)
HSVhsv(254, 76%, 48%)
CMYKcmyk(58.5%, 76.4%, 0%, 51.8%)
CIE-LABlab(20.09, 36.39, -49.60)
CIE-LCHlch(20.09, 61.51, 306.27°)
OKLaboklab(32.73% 0.0397 -0.1428)
OKLCHoklch(32.73% 0.148 285.6)
XYZxyz(5.3787, 3.0123, 19.0331)
Luminance0.0301 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D7B #657B1D
analogous
#1D367B #331D7B #621D7B
triadic
#331D7B #7B331D #1D7B33
tetradic
#331D7B #7B1D36 #657B1D #1D7B62
square
#331D7B #7B1D36 #657B1D #1D7B62
split-complementary
#331D7B #7B621D #367B1D
monochromatic
#0A0619 #1E1149 #331D7B #4829AD #6240D2

Accessibility & contrast

On white

13.10
#331D7B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#331D7B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D7B
13.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D7B#FFFFFF#000000##FFFFFF
##331D7B1.0013.101.6013.10
#FFFFFF13.101.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337E
Deuteranopia (green-blind)
#002E79
Tritanopia (blue-blind)
#10374A
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331d7b;
/* rgb */ color: rgb(51, 29, 123);
/* oklch */ color: oklch(32.7% 0.148 285.6);
Tailwind
colors: {
  custom: {
    50: '#745ca2',
    500: '#331d7b',
    950: '#000000',
  },
}
SCSS
$custom: #331d7b;
$custom-light: #745ca2;
$custom-dark: #000000;
JSON
{
  "hex": "#331d7b",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 123
  },
  "hsl": {
    "h": 254.043,
    "s": 61.842,
    "l": 29.804
  },
  "oklch": {
    "l": 0.32725,
    "c": 0.14821,
    "h": 285.6
  },
  "luminance": 0.03013
}

Semantic roles & 50–950 ramp

primary
#331D7B
secondary
#96AF45
accent
#E543BF
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331D7B

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

Preview Lab → · Contrast checker → · Palette generator →

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