#331E7B#331E7B

#331E7B is a dark, vivid violet. Relative luminance 0.031; OKLCH L 32.9% C 0.147 H 285.3°. Best body text is #FFFFFF at 13.02:1 contrast (WCAG AA passes).

Color values

HEX#331E7B
RGBrgb(51, 30, 123)
HSLhsl(254, 61%, 30%)
HSVhsv(254, 76%, 48%)
CMYKcmyk(58.5%, 75.6%, 0%, 51.8%)
CIE-LABlab(20.29, 35.83, -49.27)
CIE-LCHlch(20.29, 60.92, 306.03°)
OKLaboklab(32.87% 0.0389 -0.1418)
OKLCHoklch(32.87% 0.147 285.3)
XYZxyz(5.4036, 3.0621, 19.0414)
Luminance0.0306 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E7B #667B1E
analogous
#1E387B #331E7B #611E7B
triadic
#331E7B #7B331E #1E7B33
tetradic
#331E7B #7B1E38 #667B1E #1E7B61
square
#331E7B #7B1E38 #667B1E #1E7B61
split-complementary
#331E7B #7B611E #387B1E
monochromatic
#0A0619 #1F124A #331E7B #472AAC #6342D1

Accessibility & contrast

On white

13.02
#331E7B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331E7B
13.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E7B#FFFFFF#000000##FFFFFF
##331E7B1.0013.021.6113.02
#FFFFFF13.021.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337E
Deuteranopia (green-blind)
#002E79
Tritanopia (blue-blind)
#10374A
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331e7b;
/* rgb */ color: rgb(51, 30, 123);
/* oklch */ color: oklch(32.9% 0.147 285.3);
Tailwind
colors: {
  custom: {
    50: '#745ca2',
    500: '#331e7b',
    950: '#000000',
  },
}
SCSS
$custom: #331e7b;
$custom-light: #745ca2;
$custom-dark: #000000;
JSON
{
  "hex": "#331e7b",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 123
  },
  "hsl": {
    "h": 253.548,
    "s": 60.784,
    "l": 30
  },
  "oklch": {
    "l": 0.32865,
    "c": 0.14707,
    "h": 285.3
  },
  "luminance": 0.03062
}

Semantic roles & 50–950 ramp

primary
#331E7B
secondary
#97AE46
accent
#E444C0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331E7B

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

Preview Lab → · Contrast checker → · Palette generator →

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