#331A7C#331A7C

#331A7C is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.4% C 0.153 H 285.9°. Best body text is #FFFFFF at 13.29:1 contrast (WCAG AA passes).

Color values

HEX#331A7C
RGBrgb(51, 26, 124)
HSLhsl(255, 65%, 29%)
HSVhsv(255, 79%, 49%)
CMYKcmyk(58.9%, 79%, 0%, 51.4%)
CIE-LABlab(19.63, 38.31, -51.00)
CIE-LCHlch(19.63, 63.78, 306.91°)
OKLaboklab(32.43% 0.0418 -0.1468)
OKLCHoklch(32.43% 0.153 285.9)
XYZxyz(5.3716, 2.8975, 19.3411)
Luminance0.0290 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A7C #637C1A
analogous
#1A327C #331A7C #641A7C
triadic
#331A7C #7C331A #1A7C33
tetradic
#331A7C #7C1A32 #637C1A #1A7C64
square
#331A7C #7C1A32 #637C1A #1A7C64
split-complementary
#331A7C #7C641A #327C1A
monochromatic
#0A0519 #1E0F49 #331A7C #4825AF #623BD6

Accessibility & contrast

On white

13.29
#331A7C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#331A7C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A7C
13.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A7C#FFFFFF#000000##FFFFFF
##331A7C1.0013.291.5813.29
#FFFFFF13.291.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327F
Deuteranopia (green-blind)
#002D7A
Tritanopia (blue-blind)
#0F364A
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331a7c;
/* rgb */ color: rgb(51, 26, 124);
/* oklch */ color: oklch(32.4% 0.153 285.9);
Tailwind
colors: {
  custom: {
    50: '#745aa3',
    500: '#331a7c',
    950: '#000000',
  },
}
SCSS
$custom: #331a7c;
$custom-light: #745aa3;
$custom-dark: #000000;
JSON
{
  "hex": "#331a7c",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 124
  },
  "hsl": {
    "h": 255.306,
    "s": 65.333,
    "l": 29.412
  },
  "oklch": {
    "l": 0.32429,
    "c": 0.15269,
    "h": 285.9
  },
  "luminance": 0.02898
}

Semantic roles & 50–950 ramp

primary
#331A7C
secondary
#94B042
accent
#E840BD
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331A7C

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

Preview Lab → · Contrast checker → · Palette generator →

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