#331971#331971

#331971 is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.2% C 0.140 H 289.1°. Best body text is #FFFFFF at 13.83:1 contrast (WCAG AA passes).

Color values

HEX#331971
RGBrgb(51, 25, 113)
HSLhsl(258, 64%, 27%)
HSVhsv(258, 78%, 44%)
CMYKcmyk(54.9%, 77.9%, 0%, 55.7%)
CIE-LABlab(18.33, 35.47, -46.08)
CIE-LCHlch(18.33, 58.15, 307.59°)
OKLaboklab(31.18% 0.0458 -0.1324)
OKLCHoklch(31.18% 0.14 289.1)
XYZxyz(4.6926, 2.5911, 15.8725)
Luminance0.0259 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331971 #577119
analogous
#192B71 #331971 #5F1971
triadic
#331971 #713319 #197133
tetradic
#331971 #71192B #577119 #19715F
square
#331971 #71192B #577119 #19715F
split-complementary
#331971 #715F19 #2B7119
monochromatic
#0B0619 #1C0E3F #331971 #4A24A3 #6233D2

Accessibility & contrast

On white

13.83
#331971 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#331971 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331971
13.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331971#FFFFFF#000000##FFFFFF
##3319711.0013.831.5213.83
#FFFFFF13.831.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E74
Deuteranopia (green-blind)
#002A6F
Tritanopia (blue-blind)
#1C3144
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #331971;
/* rgb */ color: rgb(51, 25, 113);
/* oklch */ color: oklch(31.2% 0.140 289.1);
Tailwind
colors: {
  custom: {
    50: '#72599b',
    500: '#331971',
    950: '#000000',
  },
}
SCSS
$custom: #331971;
$custom-light: #72599b;
$custom-dark: #000000;
JSON
{
  "hex": "#331971",
  "rgb": {
    "r": 51,
    "g": 25,
    "b": 113
  },
  "hsl": {
    "h": 257.727,
    "s": 63.768,
    "l": 27.059
  },
  "oklch": {
    "l": 0.31175,
    "c": 0.14013,
    "h": 289.1
  },
  "luminance": 0.02591
}

Semantic roles & 50–950 ramp

primary
#331971
secondary
#88A640
accent
#E741B6
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09030E
muted
#7B787E

Preview Lab

Preview with #331971

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

Preview Lab → · Contrast checker → · Palette generator →

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