#331C8C#331C8C

#331C8C is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.4% C 0.170 H 282.1°. Best body text is #FFFFFF at 12.46:1 contrast (WCAG AA passes).

Color values

HEX#331C8C
RGBrgb(51, 28, 140)
HSLhsl(252, 67%, 33%)
HSVhsv(252, 80%, 55%)
CMYKcmyk(63.6%, 80%, 0%, 45.1%)
CIE-LABlab(21.68, 42.19, -57.71)
CIE-LCHlch(21.68, 71.48, 306.17°)
OKLaboklab(34.37% 0.0357 -0.1665)
OKLCHoklch(34.37% 0.17 282.1)
XYZxyz(6.5126, 3.4273, 25.1242)
Luminance0.0343 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331C8C #758C1C
analogous
#1C3D8C #331C8C #6B1C8C
triadic
#331C8C #8C331C #1C8C33
tetradic
#331C8C #8C1C3D #758C1C #1C8C6B
square
#331C8C #8C1C3D #758C1C #1C8C6B
split-complementary
#331C8C #8C6B1C #3D8C1C
monochromatic
#0E0826 #201259 #331C8C #4626BF #6648DA

Accessibility & contrast

On white

12.46
#331C8C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#331C8C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331C8C
12.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331C8C#FFFFFF#000000##FFFFFF
##331C8C1.0012.461.6912.46
#FFFFFF12.461.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388F
Deuteranopia (green-blind)
#00308A
Tritanopia (blue-blind)
#003D54
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #331c8c;
/* rgb */ color: rgb(51, 28, 140);
/* oklch */ color: oklch(34.4% 0.170 282.1);
Tailwind
colors: {
  custom: {
    50: '#775caf',
    500: '#331c8c',
    950: '#000000',
  },
}
SCSS
$custom: #331c8c;
$custom-light: #775caf;
$custom-dark: #000000;
JSON
{
  "hex": "#331c8c",
  "rgb": {
    "r": 51,
    "g": 28,
    "b": 140
  },
  "hsl": {
    "h": 252.321,
    "s": 66.667,
    "l": 32.941
  },
  "oklch": {
    "l": 0.34371,
    "c": 0.17025,
    "h": 282.1
  },
  "luminance": 0.03428
}

Semantic roles & 50–950 ramp

primary
#331C8C
secondary
#A4BC48
accent
#EA3EC6
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331C8C

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

Preview Lab → · Contrast checker → · Palette generator →

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