#331D7E#331D7E

#331D7E is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.0% C 0.152 H 284.9°. Best body text is #FFFFFF at 12.98:1 contrast (WCAG AA passes).

Color values

HEX#331D7E
RGBrgb(51, 29, 126)
HSLhsl(254, 63%, 30%)
HSVhsv(254, 77%, 49%)
CMYKcmyk(59.5%, 77%, 0%, 50.6%)
CIE-LABlab(20.40, 37.33, -51.01)
CIE-LCHlch(20.40, 63.21, 306.20°)
OKLaboklab(33.03% 0.039 -0.1469)
OKLCHoklch(33.03% 0.152 284.9)
XYZxyz(5.5694, 3.0886, 20.0373)
Luminance0.0309 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D7E #687E1D
analogous
#1D377E #331D7E #631D7E
triadic
#331D7E #7E331D #1D7E33
tetradic
#331D7E #7E1D37 #687E1D #1D7E63
square
#331D7E #7E1D37 #687E1D #1D7E63
split-complementary
#331D7E #7E631D #377E1D
monochromatic
#0B061B #1F124C #331D7E #4728B0 #6342D3

Accessibility & contrast

On white

12.98
#331D7E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#331D7E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D7E
12.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D7E#FFFFFF#000000##FFFFFF
##331D7E1.0012.981.6212.98
#FFFFFF12.981.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003481
Deuteranopia (green-blind)
#002E7C
Tritanopia (blue-blind)
#0B384C
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331d7e;
/* rgb */ color: rgb(51, 29, 126);
/* oklch */ color: oklch(33.0% 0.152 284.9);
Tailwind
colors: {
  custom: {
    50: '#745ca4',
    500: '#331d7e',
    950: '#000000',
  },
}
SCSS
$custom: #331d7e;
$custom-light: #745ca4;
$custom-dark: #000000;
JSON
{
  "hex": "#331d7e",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 126
  },
  "hsl": {
    "h": 253.608,
    "s": 62.581,
    "l": 30.392
  },
  "oklch": {
    "l": 0.3303,
    "c": 0.15199,
    "h": 284.9
  },
  "luminance": 0.03089
}

Semantic roles & 50–950 ramp

primary
#331D7E
secondary
#99B145
accent
#E642C1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331D7E

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

Preview Lab → · Contrast checker → · Palette generator →

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