#331158#331158

#331158 is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.7% C 0.119 H 300.4°. Best body text is #FFFFFF at 15.42:1 contrast (WCAG AA passes).

Color values

HEX#331158
RGBrgb(51, 17, 88)
HSLhsl(269, 68%, 21%)
HSVhsv(269, 81%, 35%)
CMYKcmyk(42%, 80.7%, 0%, 65.5%)
CIE-LABlab(14.45, 32.29, -35.90)
CIE-LCHlch(14.45, 48.29, 311.97°)
OKLaboklab(27.71% 0.0602 -0.1025)
OKLCHoklch(27.71% 0.119 300.4)
XYZxyz(3.3267, 1.8093, 9.4046)
Luminance0.0181 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331158 #365811
analogous
#111358 #331158 #561158
triadic
#331158 #583311 #115833
tetradic
#331158 #581113 #365811 #115856
square
#331158 #581113 #365811 #115856
split-complementary
#331158 #585611 #135811
monochromatic
#0F051A #150725 #331158 #511B8B #6E25BF

Accessibility & contrast

On white

15.42
#331158 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331158
15.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331158#FFFFFF#000000##FFFFFF
##3311581.0015.421.3615.42
#FFFFFF15.421.0021.001.00
#0000001.3621.001.0021.00
##FFFFFF15.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00245A
Deuteranopia (green-blind)
#002457
Tritanopia (blue-blind)
#2B2333
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #331158;
/* rgb */ color: rgb(51, 17, 88);
/* oklch */ color: oklch(27.7% 0.119 300.4);
Tailwind
colors: {
  custom: {
    50: '#6f5388',
    500: '#331158',
    950: '#000000',
  },
}
SCSS
$custom: #331158;
$custom-light: #6f5388;
$custom-dark: #000000;
JSON
{
  "hex": "#331158",
  "rgb": {
    "r": 51,
    "g": 17,
    "b": 88
  },
  "hsl": {
    "h": 268.732,
    "s": 67.619,
    "l": 20.588
  },
  "oklch": {
    "l": 0.27706,
    "c": 0.11892,
    "h": 300.4
  },
  "luminance": 0.01809
}

Semantic roles & 50–950 ramp

primary
#331158
secondary
#649134
accent
#EA3D98
background
#F6F4F8
surface
#ECE7F0
border
#C7C3CB
text
#08020B
muted
#7B787C

Preview Lab

Preview with #331158

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

Preview Lab → · Contrast checker → · Palette generator →

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