#331E7C#331E7C

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

Color values

HEX#331E7C
RGBrgb(51, 30, 124)
HSLhsl(253, 61%, 30%)
HSVhsv(253, 76%, 49%)
CMYKcmyk(58.9%, 75.8%, 0%, 51.4%)
CIE-LABlab(20.39, 36.15, -49.75)
CIE-LCHlch(20.39, 61.49, 306.00°)
OKLaboklab(32.97% 0.0387 -0.1432)
OKLCHoklch(32.97% 0.148 285.1)
XYZxyz(5.4665, 3.0873, 19.3727)
Luminance0.0309 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E7C #677C1E
analogous
#1E387C #331E7C #621E7C
triadic
#331E7C #7C331E #1E7C33
tetradic
#331E7C #7C1E38 #677C1E #1E7C62
square
#331E7C #7C1E38 #677C1E #1E7C62
split-complementary
#331E7C #7C621E #387C1E
monochromatic
#0A0619 #1F124B #331E7C #472AAD #6343D1

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##331E7C#FFFFFF#000000##FFFFFF
##331E7C1.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)
#00347F
Deuteranopia (green-blind)
#002E7A
Tritanopia (blue-blind)
#0E384B
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331e7c;
/* rgb */ color: rgb(51, 30, 124);
/* oklch */ color: oklch(33.0% 0.148 285.1);
Tailwind
colors: {
  custom: {
    50: '#745ca3',
    500: '#331e7c',
    950: '#000000',
  },
}
SCSS
$custom: #331e7c;
$custom-light: #745ca3;
$custom-dark: #000000;
JSON
{
  "hex": "#331e7c",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 124
  },
  "hsl": {
    "h": 253.404,
    "s": 61.039,
    "l": 30.196
  },
  "oklch": {
    "l": 0.32965,
    "c": 0.14835,
    "h": 285.1
  },
  "luminance": 0.03088
}

Semantic roles & 50–950 ramp

primary
#331E7C
secondary
#98AF46
accent
#E444C0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331E7C

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

Preview Lab → · Contrast checker → · Palette generator →

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