#331E7F#331E7F

#331E7F is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.3% C 0.152 H 284.4°. Best body text is #FFFFFF at 12.86:1 contrast (WCAG AA passes).

Color values

HEX#331E7F
RGBrgb(51, 30, 127)
HSLhsl(253, 62%, 31%)
HSVhsv(253, 76%, 50%)
CMYKcmyk(59.8%, 76.4%, 0%, 50.2%)
CIE-LABlab(20.69, 37.09, -51.16)
CIE-LCHlch(20.69, 63.19, 305.94°)
OKLaboklab(33.27% 0.0379 -0.1473)
OKLCHoklch(33.27% 0.152 284.4)
XYZxyz(5.6591, 3.1643, 20.3871)
Luminance0.0316 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E7F #6A7F1E
analogous
#1E397F #331E7F #631E7F
triadic
#331E7F #7F331E #1E7F33
tetradic
#331E7F #7F1E39 #6A7F1E #1E7F63
square
#331E7F #7F1E39 #6A7F1E #1E7F63
split-complementary
#331E7F #7F631E #397F1E
monochromatic
#0B071C #1F124D #331E7F #472AB1 #6344D3

Accessibility & contrast

On white

12.86
#331E7F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#331E7F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331E7F
12.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E7F#FFFFFF#000000##FFFFFF
##331E7F1.0012.861.6312.86
#FFFFFF12.861.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003582
Deuteranopia (green-blind)
#002F7D
Tritanopia (blue-blind)
#09394D
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #331e7f;
/* rgb */ color: rgb(51, 30, 127);
/* oklch */ color: oklch(33.3% 0.152 284.4);
Tailwind
colors: {
  custom: {
    50: '#745ca5',
    500: '#331e7f',
    950: '#000000',
  },
}
SCSS
$custom: #331e7f;
$custom-light: #745ca5;
$custom-dark: #000000;
JSON
{
  "hex": "#331e7f",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 127
  },
  "hsl": {
    "h": 252.99,
    "s": 61.783,
    "l": 30.784
  },
  "oklch": {
    "l": 0.33268,
    "c": 0.15215,
    "h": 284.4
  },
  "luminance": 0.03165
}

Semantic roles & 50–950 ramp

primary
#331E7F
secondary
#9BB247
accent
#E543C2
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331E7F

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

Preview Lab → · Contrast checker → · Palette generator →

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