#331271#331271

#331271 is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.3% C 0.147 H 290.4°. Best body text is #FFFFFF at 14.33:1 contrast (WCAG AA passes).

Color values

HEX#331271
RGBrgb(51, 18, 113)
HSLhsl(261, 73%, 26%)
HSVhsv(261, 84%, 44%)
CMYKcmyk(54.9%, 84.1%, 0%, 55.7%)
CIE-LABlab(17.12, 38.92, -48.05)
CIE-LCHlch(17.12, 61.84, 309.01°)
OKLaboklab(30.34% 0.0514 -0.1381)
OKLCHoklch(30.34% 0.147 290.4)
XYZxyz(4.5613, 2.3285, 15.8287)
Luminance0.0233 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331271 #507112
analogous
#122071 #331271 #621271
triadic
#331271 #713312 #127133
tetradic
#331271 #711220 #507112 #127162
square
#331271 #711220 #507112 #127162
split-complementary
#331271 #716212 #207112
monochromatic
#0C041A #1B0A3C #331271 #4B1AA6 #6323DB

Accessibility & contrast

On white

14.33
#331271 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#331271 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331271
14.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331271#FFFFFF#000000##FFFFFF
##3312711.0014.331.4714.33
#FFFFFF14.331.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.331.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #331271;
/* rgb */ color: rgb(51, 18, 113);
/* oklch */ color: oklch(30.3% 0.147 290.4);
Tailwind
colors: {
  custom: {
    50: '#73559b',
    500: '#331271',
    950: '#000000',
  },
}
SCSS
$custom: #331271;
$custom-light: #73559b;
$custom-dark: #000000;
JSON
{
  "hex": "#331271",
  "rgb": {
    "r": 51,
    "g": 18,
    "b": 113
  },
  "hsl": {
    "h": 260.842,
    "s": 72.519,
    "l": 25.686
  },
  "oklch": {
    "l": 0.30336,
    "c": 0.14738,
    "h": 290.4
  },
  "luminance": 0.02329
}

Semantic roles & 50–950 ramp

primary
#331271
secondary
#81A837
accent
#EF39B0
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09030E
muted
#7B787E

Preview Lab

Preview with #331271

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

Preview Lab → · Contrast checker → · Palette generator →

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