#331D6C#331D6C

#331D6C is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.3% C 0.129 H 289.6°. Best body text is #FFFFFF at 13.70:1 contrast (WCAG AA passes).

Color values

HEX#331D6C
RGBrgb(51, 29, 108)
HSLhsl(257, 58%, 27%)
HSVhsv(257, 73%, 42%)
CMYKcmyk(52.8%, 73.1%, 0%, 57.6%)
CIE-LABlab(18.65, 31.67, -42.30)
CIE-LCHlch(18.65, 52.84, 306.82°)
OKLaboklab(31.26% 0.0432 -0.1214)
OKLCHoklch(31.26% 0.129 289.6)
XYZxyz(4.5106, 2.6651, 14.4612)
Luminance0.0267 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D6C #566C1D
analogous
#1D2F6C #331D6C #5B1D6C
triadic
#331D6C #6C331D #1D6C33
tetradic
#331D6C #6C1D2F #566C1D #1D6C5B
square
#331D6C #6C1D2F #566C1D #1D6C5B
split-complementary
#331D6C #6C5B1D #2F6C1D
monochromatic
#0B0618 #1C103C #331D6C #4A2A9C #6239CA

Accessibility & contrast

On white

13.70
#331D6C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#331D6C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D6C
13.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D6C#FFFFFF#000000##FFFFFF
##331D6C1.0013.701.5313.70
#FFFFFF13.701.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F6E
Deuteranopia (green-blind)
#002B6A
Tritanopia (blue-blind)
#1F3142
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #331d6c;
/* rgb */ color: rgb(51, 29, 108);
/* oklch */ color: oklch(31.3% 0.129 289.6);
Tailwind
colors: {
  custom: {
    50: '#715b97',
    500: '#331d6c',
    950: '#000000',
  },
}
SCSS
$custom: #331d6c;
$custom-light: #715b97;
$custom-dark: #000000;
JSON
{
  "hex": "#331d6c",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 108
  },
  "hsl": {
    "h": 256.709,
    "s": 57.664,
    "l": 26.863
  },
  "oklch": {
    "l": 0.31257,
    "c": 0.12884,
    "h": 289.6
  },
  "luminance": 0.02665
}

Semantic roles & 50–950 ramp

primary
#331D6C
secondary
#87A144
accent
#E147B6
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040D
muted
#7B797E

Preview Lab

Preview with #331D6C

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

Preview Lab → · Contrast checker → · Palette generator →

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