#331D68#331D68

#331D68 is a dark, vivid violet. Relative luminance 0.026; OKLCH L 30.9% C 0.124 H 290.8°. Best body text is #FFFFFF at 13.85:1 contrast (WCAG AA passes).

Color values

HEX#331D68
RGBrgb(51, 29, 104)
HSLhsl(258, 56%, 26%)
HSVhsv(258, 72%, 41%)
CMYKcmyk(51%, 72.1%, 0%, 59.2%)
CIE-LABlab(18.28, 30.42, -40.29)
CIE-LCHlch(18.28, 50.48, 307.06°)
OKLaboklab(30.88% 0.0439 -0.1155)
OKLCHoklch(30.88% 0.124 290.8)
XYZxyz(4.3026, 2.5818, 13.3657)
Luminance0.0258 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D68 #52681D
analogous
#1D2C68 #331D68 #581D68
triadic
#331D68 #68331D #1D6833
tetradic
#331D68 #681D2C #52681D #1D6858
square
#331D68 #681D2C #52681D #1D6858
split-complementary
#331D68 #68581D #2C681D
monochromatic
#0C0718 #1C1038 #331D68 #4A2A98 #6238C7

Accessibility & contrast

On white

13.85
#331D68 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#331D68 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D68
13.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D68#FFFFFF#000000##FFFFFF
##331D681.0013.851.5213.85
#FFFFFF13.851.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E6A
Deuteranopia (green-blind)
#002B67
Tritanopia (blue-blind)
#223040
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #331d68;
/* rgb */ color: rgb(51, 29, 104);
/* oklch */ color: oklch(30.9% 0.124 290.8);
Tailwind
colors: {
  custom: {
    50: '#705b94',
    500: '#331d68',
    950: '#000000',
  },
}
SCSS
$custom: #331d68;
$custom-light: #705b94;
$custom-dark: #000000;
JSON
{
  "hex": "#331d68",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 104
  },
  "hsl": {
    "h": 257.6,
    "s": 56.391,
    "l": 26.078
  },
  "oklch": {
    "l": 0.30883,
    "c": 0.12354,
    "h": 290.8
  },
  "luminance": 0.02582
}

Semantic roles & 50–950 ramp

primary
#331D68
secondary
#839D44
accent
#E048B3
background
#F7F5F9
surface
#EDE9F1
border
#C8C5CB
text
#08040D
muted
#7B797E

Preview Lab

Preview with #331D68

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

Preview Lab → · Contrast checker → · Palette generator →

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