#331157#331157

#331157 is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.6% C 0.118 H 300.9°. Best body text is #FFFFFF at 15.46:1 contrast (WCAG AA passes).

Color values

HEX#331157
RGBrgb(51, 17, 87)
HSLhsl(269, 67%, 20%)
HSVhsv(269, 80%, 34%)
CMYKcmyk(41.4%, 80.5%, 0%, 65.9%)
CIE-LABlab(14.36, 32.02, -35.38)
CIE-LCHlch(14.36, 47.71, 312.14°)
OKLaboklab(27.61% 0.0605 -0.101)
OKLCHoklch(27.61% 0.118 300.9)
XYZxyz(3.2856, 1.7928, 9.1879)
Luminance0.0179 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331157 #355711
analogous
#111257 #331157 #561157
triadic
#331157 #573311 #115733
tetradic
#331157 #571112 #355711 #115756
square
#331157 #571112 #355711 #115756
split-complementary
#331157 #575611 #125711
monochromatic
#0F051A #150724 #331157 #511B8A #6F25BD

Accessibility & contrast

On white

15.46
#331157 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.36
#331157 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331157
15.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331157#FFFFFF#000000##FFFFFF
##3311571.0015.461.3615.46
#FFFFFF15.461.0021.001.00
#0000001.3621.001.0021.00
##FFFFFF15.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002459
Deuteranopia (green-blind)
#002456
Tritanopia (blue-blind)
#2B2333
Achromatopsia (no color)
#242424

Design tokens & code

CSS
--color: #331157;
/* rgb */ color: rgb(51, 17, 87);
/* oklch */ color: oklch(27.6% 0.118 300.9);
Tailwind
colors: {
  custom: {
    50: '#6f5387',
    500: '#331157',
    950: '#000000',
  },
}
SCSS
$custom: #331157;
$custom-light: #6f5387;
$custom-dark: #000000;
JSON
{
  "hex": "#331157",
  "rgb": {
    "r": 51,
    "g": 17,
    "b": 87
  },
  "hsl": {
    "h": 269.143,
    "s": 67.308,
    "l": 20.392
  },
  "oklch": {
    "l": 0.27612,
    "c": 0.11773,
    "h": 300.9
  },
  "luminance": 0.01793
}

Semantic roles & 50–950 ramp

primary
#331157
secondary
#639034
accent
#EA3E96
background
#F6F4F8
surface
#ECE7EF
border
#C7C3CA
text
#08020B
muted
#7B787C

Preview Lab

Preview with #331157

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

Preview Lab → · Contrast checker → · Palette generator →

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