#331A8F#331A8F

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

Color values

HEX#331A8F
RGBrgb(51, 26, 143)
HSLhsl(253, 69%, 33%)
HSVhsv(253, 82%, 56%)
CMYKcmyk(64.3%, 81.8%, 0%, 43.9%)
CIE-LABlab(21.67, 44.07, -59.59)
CIE-LCHlch(21.67, 74.11, 306.49°)
OKLaboklab(34.46% 0.0359 -0.1719)
OKLCHoklch(34.46% 0.176 281.8)
XYZxyz(6.6910, 3.4253, 26.2898)
Luminance0.0343 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A8F #768F1A
analogous
#1A3B8F #331A8F #6E1A8F
triadic
#331A8F #8F331A #1A8F33
tetradic
#331A8F #8F1A3B #768F1A #1A8F6E
square
#331A8F #8F1A3B #768F1A #1A8F6E
split-complementary
#331A8F #8F6E1A #3B8F1A
monochromatic
#0E0727 #21115B #331A8F #4523C3 #6646DD

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##331A8F#FFFFFF#000000##FFFFFF
##331A8F1.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)
#003892
Deuteranopia (green-blind)
#00308D
Tritanopia (blue-blind)
#003E55
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #331a8f;
/* rgb */ color: rgb(51, 26, 143);
/* oklch */ color: oklch(34.5% 0.176 281.8);
Tailwind
colors: {
  custom: {
    50: '#785bb1',
    500: '#331a8f',
    950: '#000000',
  },
}
SCSS
$custom: #331a8f;
$custom-light: #785bb1;
$custom-dark: #000000;
JSON
{
  "hex": "#331a8f",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 143
  },
  "hsl": {
    "h": 252.821,
    "s": 69.231,
    "l": 33.137
  },
  "oklch": {
    "l": 0.34463,
    "c": 0.17563,
    "h": 281.8
  },
  "luminance": 0.03426
}

Semantic roles & 50–950 ramp

primary
#331A8F
secondary
#A5BF46
accent
#EC3CC6
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331A8F

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

Preview Lab → · Contrast checker → · Palette generator →

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