#331A7F#331A7F

#331A7F is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.7% C 0.156 H 285.2°. Best body text is #FFFFFF at 13.17:1 contrast (WCAG AA passes).

Color values

HEX#331A7F
RGBrgb(51, 26, 127)
HSLhsl(255, 66%, 30%)
HSVhsv(255, 80%, 50%)
CMYKcmyk(59.8%, 79.5%, 0%, 50.2%)
CIE-LABlab(19.94, 39.22, -52.39)
CIE-LCHlch(19.94, 65.45, 306.82°)
OKLaboklab(32.74% 0.041 -0.1509)
OKLCHoklch(32.74% 0.156 285.2)
XYZxyz(5.5642, 2.9746, 20.3555)
Luminance0.0297 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A7F #667F1A
analogous
#1A347F #331A7F #651A7F
triadic
#331A7F #7F331A #1A7F33
tetradic
#331A7F #7F1A34 #667F1A #1A7F65
square
#331A7F #7F1A34 #667F1A #1A7F65
split-complementary
#331A7F #7F651A #347F1A
monochromatic
#0A0519 #1F104C #331A7F #4724B2 #633CD7

Accessibility & contrast

On white

13.17
#331A7F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#331A7F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A7F
13.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A7F#FFFFFF#000000##FFFFFF
##331A7F1.0013.171.6013.17
#FFFFFF13.171.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003382
Deuteranopia (green-blind)
#002D7D
Tritanopia (blue-blind)
#09374C
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331a7f;
/* rgb */ color: rgb(51, 26, 127);
/* oklch */ color: oklch(32.7% 0.156 285.2);
Tailwind
colors: {
  custom: {
    50: '#755aa5',
    500: '#331a7f',
    950: '#000000',
  },
}
SCSS
$custom: #331a7f;
$custom-light: #755aa5;
$custom-dark: #000000;
JSON
{
  "hex": "#331a7f",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 127
  },
  "hsl": {
    "h": 254.851,
    "s": 66.013,
    "l": 30
  },
  "oklch": {
    "l": 0.32743,
    "c": 0.15638,
    "h": 285.2
  },
  "luminance": 0.02975
}

Semantic roles & 50–950 ramp

primary
#331A7F
secondary
#97B342
accent
#E93FBF
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331A7F

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

Preview Lab → · Contrast checker → · Palette generator →

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