#331772#331772

#331772 is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.0% C 0.144 H 289.2°. Best body text is #FFFFFF at 13.94:1 contrast (WCAG AA passes).

Color values

HEX#331772
RGBrgb(51, 23, 114)
HSLhsl(258, 66%, 27%)
HSVhsv(258, 80%, 45%)
CMYKcmyk(55.3%, 79.8%, 0%, 55.3%)
CIE-LABlab(18.06, 36.82, -47.16)
CIE-LCHlch(18.06, 59.83, 307.98°)
OKLaboklab(31.02% 0.0472 -0.1356)
OKLCHoklch(31.02% 0.144 289.2)
XYZxyz(4.7080, 2.5313, 16.1568)
Luminance0.0253 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331772 #567217
analogous
#172872 #331772 #611772
triadic
#331772 #723317 #177233
tetradic
#331772 #721728 #567217 #177261
square
#331772 #721728 #567217 #177261
split-complementary
#331772 #726117 #287217
monochromatic
#0B0519 #1C0D3F #331772 #4A21A5 #622ED5

Accessibility & contrast

On white

13.94
#331772 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#331772 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331772
13.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331772#FFFFFF#000000##FFFFFF
##3317721.0013.941.5113.94
#FFFFFF13.941.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E75
Deuteranopia (green-blind)
#002A70
Tritanopia (blue-blind)
#1B3144
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #331772;
/* rgb */ color: rgb(51, 23, 114);
/* oklch */ color: oklch(31.0% 0.144 289.2);
Tailwind
colors: {
  custom: {
    50: '#73589b',
    500: '#331772',
    950: '#000000',
  },
}
SCSS
$custom: #331772;
$custom-light: #73589b;
$custom-dark: #000000;
JSON
{
  "hex": "#331772",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 114
  },
  "hsl": {
    "h": 258.462,
    "s": 66.423,
    "l": 26.863
  },
  "oklch": {
    "l": 0.31019,
    "c": 0.14357,
    "h": 289.2
  },
  "luminance": 0.02532
}

Semantic roles & 50–950 ramp

primary
#331772
secondary
#87A83D
accent
#E93EB5
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09030E
muted
#7B787E

Preview Lab

Preview with #331772

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

Preview Lab → · Contrast checker → · Palette generator →

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