#331C7B#331C7B

#331C7B is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.6% C 0.149 H 285.8°. Best body text is #FFFFFF at 13.18:1 contrast (WCAG AA passes).

Color values

HEX#331C7B
RGBrgb(51, 28, 123)
HSLhsl(255, 63%, 30%)
HSVhsv(255, 77%, 48%)
CMYKcmyk(58.5%, 77.2%, 0%, 51.8%)
CIE-LABlab(19.90, 36.94, -49.92)
CIE-LCHlch(19.90, 62.10, 306.50°)
OKLaboklab(32.59% 0.0406 -0.1437)
OKLCHoklch(32.59% 0.149 285.8)
XYZxyz(5.3546, 2.9641, 19.0250)
Luminance0.0296 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331C7B #647B1C
analogous
#1C357B #331C7B #631C7B
triadic
#331C7B #7B331C #1C7B33
tetradic
#331C7B #7B1C35 #647B1C #1C7B63
square
#331C7B #7B1C35 #647B1C #1C7B63
split-complementary
#331C7B #7B631C #357B1C
monochromatic
#0A0619 #1E1149 #331C7B #4827AD #623ED3

Accessibility & contrast

On white

13.18
#331C7B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#331C7B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331C7B
13.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331C7B#FFFFFF#000000##FFFFFF
##331C7B1.0013.181.5913.18
#FFFFFF13.181.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337E
Deuteranopia (green-blind)
#002D79
Tritanopia (blue-blind)
#10364A
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331c7b;
/* rgb */ color: rgb(51, 28, 123);
/* oklch */ color: oklch(32.6% 0.149 285.8);
Tailwind
colors: {
  custom: {
    50: '#745ba2',
    500: '#331c7b',
    950: '#000000',
  },
}
SCSS
$custom: #331c7b;
$custom-light: #745ba2;
$custom-dark: #000000;
JSON
{
  "hex": "#331c7b",
  "rgb": {
    "r": 51,
    "g": 28,
    "b": 123
  },
  "hsl": {
    "h": 254.526,
    "s": 62.914,
    "l": 29.608
  },
  "oklch": {
    "l": 0.32588,
    "c": 0.14931,
    "h": 285.8
  },
  "luminance": 0.02964
}

Semantic roles & 50–950 ramp

primary
#331C7B
secondary
#95AF44
accent
#E642BE
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331C7B

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

Preview Lab → · Contrast checker → · Palette generator →

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