#331D7C#331D7C

#331D7C is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.8% C 0.149 H 285.3°. Best body text is #FFFFFF at 13.06:1 contrast (WCAG AA passes).

Color values

HEX#331D7C
RGBrgb(51, 29, 124)
HSLhsl(254, 62%, 30%)
HSVhsv(254, 77%, 49%)
CMYKcmyk(58.9%, 76.6%, 0%, 51.4%)
CIE-LABlab(20.19, 36.70, -50.07)
CIE-LCHlch(20.19, 62.08, 306.24°)
OKLaboklab(32.83% 0.0395 -0.1442)
OKLCHoklch(32.83% 0.149 285.3)
XYZxyz(5.4416, 3.0375, 19.3644)
Luminance0.0304 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D7C #667C1D
analogous
#1D367C #331D7C #631D7C
triadic
#331D7C #7C331D #1D7C33
tetradic
#331D7C #7C1D36 #667C1D #1D7C63
square
#331D7C #7C1D36 #667C1D #1D7C63
split-complementary
#331D7C #7C631D #367C1D
monochromatic
#0A0619 #1F114A #331D7C #4729AE #6341D3

Accessibility & contrast

On white

13.06
#331D7C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#331D7C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D7C
13.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D7C#FFFFFF#000000##FFFFFF
##331D7C1.0013.061.6113.06
#FFFFFF13.061.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337F
Deuteranopia (green-blind)
#002E7A
Tritanopia (blue-blind)
#0F374B
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331d7c;
/* rgb */ color: rgb(51, 29, 124);
/* oklch */ color: oklch(32.8% 0.149 285.3);
Tailwind
colors: {
  custom: {
    50: '#745ca3',
    500: '#331d7c',
    950: '#000000',
  },
}
SCSS
$custom: #331d7c;
$custom-light: #745ca3;
$custom-dark: #000000;
JSON
{
  "hex": "#331d7c",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 124
  },
  "hsl": {
    "h": 253.895,
    "s": 62.092,
    "l": 30
  },
  "oklch": {
    "l": 0.32826,
    "c": 0.14947,
    "h": 285.3
  },
  "luminance": 0.03038
}

Semantic roles & 50–950 ramp

primary
#331D7C
secondary
#97B045
accent
#E543C0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331D7C

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

Preview Lab → · Contrast checker → · Palette generator →

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