#331171#331171

#331171 is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.2% C 0.148 H 290.5°. Best body text is #FFFFFF at 14.39:1 contrast (WCAG AA passes).

Color values

HEX#331171
RGBrgb(51, 17, 113)
HSLhsl(261, 74%, 25%)
HSVhsv(261, 85%, 44%)
CMYKcmyk(54.9%, 85%, 0%, 55.7%)
CIE-LABlab(16.97, 39.36, -48.30)
CIE-LCHlch(16.97, 62.31, 309.18°)
OKLaboklab(30.23% 0.0521 -0.1389)
OKLCHoklch(30.23% 0.148 290.5)
XYZxyz(4.5455, 2.2968, 15.8234)
Luminance0.0230 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331171 #4F7111
analogous
#111F71 #331171 #631171
triadic
#331171 #713311 #117133
tetradic
#331171 #71111F #4F7111 #117163
square
#331171 #71111F #4F7111 #117163
split-complementary
#331171 #716311 #1F7111
monochromatic
#0C041B #1B093C #331171 #4B19A6 #6321DB

Accessibility & contrast

On white

14.39
#331171 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#331171 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331171
14.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331171#FFFFFF#000000##FFFFFF
##3311711.0014.391.4614.39
#FFFFFF14.391.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B74
Deuteranopia (green-blind)
#00286F
Tritanopia (blue-blind)
#1C2E42
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #331171;
/* rgb */ color: rgb(51, 17, 113);
/* oklch */ color: oklch(30.2% 0.148 290.5);
Tailwind
colors: {
  custom: {
    50: '#73559b',
    500: '#331171',
    950: '#000000',
  },
}
SCSS
$custom: #331171;
$custom-light: #73559b;
$custom-dark: #000000;
JSON
{
  "hex": "#331171",
  "rgb": {
    "r": 51,
    "g": 17,
    "b": 113
  },
  "hsl": {
    "h": 261.25,
    "s": 73.846,
    "l": 25.49
  },
  "oklch": {
    "l": 0.30232,
    "c": 0.1483,
    "h": 290.5
  },
  "luminance": 0.02297
}

Semantic roles & 50–950 ramp

primary
#331171
secondary
#80A836
accent
#F137AF
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09030E
muted
#7B787E

Preview Lab

Preview with #331171

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

Preview Lab → · Contrast checker → · Palette generator →

#331171 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva