#331872#331872

#331872 is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.1% C 0.142 H 289.0°. Best body text is #FFFFFF at 13.87:1 contrast (WCAG AA passes).

Color values

HEX#331872
RGBrgb(51, 24, 114)
HSLhsl(258, 65%, 27%)
HSVhsv(258, 79%, 45%)
CMYKcmyk(55.3%, 78.9%, 0%, 55.3%)
CIE-LABlab(18.24, 36.30, -46.86)
CIE-LCHlch(18.24, 59.28, 307.76°)
OKLaboklab(31.15% 0.0464 -0.1347)
OKLCHoklch(31.15% 0.142 289)
XYZxyz(4.7283, 2.5718, 16.1636)
Luminance0.0257 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331872 #577218
analogous
#182A72 #331872 #601872
triadic
#331872 #723318 #187233
tetradic
#331872 #72182A #577218 #187260
square
#331872 #72182A #577218 #187260
split-complementary
#331872 #726018 #2A7218
monochromatic
#0B0519 #1C0D3F #331872 #4A23A5 #6231D4

Accessibility & contrast

On white

13.87
#331872 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331872
13.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331872#FFFFFF#000000##FFFFFF
##3318721.0013.871.5113.87
#FFFFFF13.871.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.871.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #331872;
/* rgb */ color: rgb(51, 24, 114);
/* oklch */ color: oklch(31.1% 0.142 289.0);
Tailwind
colors: {
  custom: {
    50: '#73589b',
    500: '#331872',
    950: '#000000',
  },
}
SCSS
$custom: #331872;
$custom-light: #73589b;
$custom-dark: #000000;
JSON
{
  "hex": "#331872",
  "rgb": {
    "r": 51,
    "g": 24,
    "b": 114
  },
  "hsl": {
    "h": 258,
    "s": 65.217,
    "l": 27.059
  },
  "oklch": {
    "l": 0.31145,
    "c": 0.14249,
    "h": 289
  },
  "luminance": 0.02572
}

Semantic roles & 50–950 ramp

primary
#331872
secondary
#88A73E
accent
#E840B6
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09030E
muted
#7B787E

Preview Lab

Preview with #331872

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

Preview Lab → · Contrast checker → · Palette generator →

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