#331A8C#331A8C

#331A8C is a dark, vivid violet. Relative luminance 0.033; OKLCH L 34.1% C 0.172 H 282.4°. Best body text is #FFFFFF at 12.60:1 contrast (WCAG AA passes).

Color values

HEX#331A8C
RGBrgb(51, 26, 140)
HSLhsl(253, 69%, 33%)
HSVhsv(253, 81%, 55%)
CMYKcmyk(63.6%, 81.4%, 0%, 45.1%)
CIE-LABlab(21.34, 43.17, -58.27)
CIE-LCHlch(21.34, 72.52, 306.54°)
OKLaboklab(34.14% 0.0369 -0.1681)
OKLCHoklch(34.14% 0.172 282.4)
XYZxyz(6.4668, 3.3356, 25.1089)
Luminance0.0334 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A8C #738C1A
analogous
#1A3A8C #331A8C #6C1A8C
triadic
#331A8C #8C331A #1A8C33
tetradic
#331A8C #8C1A3A #738C1A #1A8C6C
square
#331A8C #8C1A3A #738C1A #1A8C6C
split-complementary
#331A8C #8C6C1A #3A8C1A
monochromatic
#0D0725 #201058 #331A8C #4624C0 #6544DC

Accessibility & contrast

On white

12.60
#331A8C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#331A8C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A8C
12.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A8C#FFFFFF#000000##FFFFFF
##331A8C1.0012.601.6712.60
#FFFFFF12.601.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00378F
Deuteranopia (green-blind)
#002F8A
Tritanopia (blue-blind)
#003C53
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #331a8c;
/* rgb */ color: rgb(51, 26, 140);
/* oklch */ color: oklch(34.1% 0.172 282.4);
Tailwind
colors: {
  custom: {
    50: '#775baf',
    500: '#331a8c',
    950: '#000000',
  },
}
SCSS
$custom: #331a8c;
$custom-light: #775baf;
$custom-dark: #000000;
JSON
{
  "hex": "#331a8c",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 140
  },
  "hsl": {
    "h": 253.158,
    "s": 68.675,
    "l": 32.549
  },
  "oklch": {
    "l": 0.34135,
    "c": 0.17207,
    "h": 282.4
  },
  "luminance": 0.03336
}

Semantic roles & 50–950 ramp

primary
#331A8C
secondary
#A3BE44
accent
#EC3CC5
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331A8C

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

Preview Lab → · Contrast checker → · Palette generator →

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