#331766#331766

#331766 is a dark, vivid violet. Relative luminance 0.023; OKLCH L 29.8% C 0.129 H 293.1°. Best body text is #FFFFFF at 14.43:1 contrast (WCAG AA passes).

Color values

HEX#331766
RGBrgb(51, 23, 102)
HSLhsl(261, 63%, 25%)
HSVhsv(261, 77%, 40%)
CMYKcmyk(50%, 77.5%, 0%, 60%)
CIE-LABlab(16.87, 33.22, -41.28)
CIE-LCHlch(16.87, 52.99, 308.83°)
OKLaboklab(29.82% 0.0506 -0.1184)
OKLCHoklch(29.82% 0.129 293.1)
XYZxyz(4.0692, 2.2758, 12.7927)
Luminance0.0228 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331766 #4A6617
analogous
#172366 #331766 #5B1766
triadic
#331766 #663317 #176633
tetradic
#331766 #661723 #4A6617 #17665B
square
#331766 #661723 #4A6617 #17665B
split-complementary
#331766 #665B17 #236617
monochromatic
#0C0619 #1A0C34 #331766 #4C2298 #652ECA

Accessibility & contrast

On white

14.43
#331766 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#331766 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331766
14.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331766#FFFFFF#000000##FFFFFF
##3317661.0014.431.4614.43
#FFFFFF14.431.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B68
Deuteranopia (green-blind)
#002864
Tritanopia (blue-blind)
#232C3D
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #331766;
/* rgb */ color: rgb(51, 23, 102);
/* oklch */ color: oklch(29.8% 0.129 293.1);
Tailwind
colors: {
  custom: {
    50: '#715792',
    500: '#331766',
    950: '#000000',
  },
}
SCSS
$custom: #331766;
$custom-light: #715792;
$custom-dark: #000000;
JSON
{
  "hex": "#331766",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 102
  },
  "hsl": {
    "h": 261.266,
    "s": 63.2,
    "l": 24.51
  },
  "oklch": {
    "l": 0.29821,
    "c": 0.1287,
    "h": 293.1
  },
  "luminance": 0.02276
}

Semantic roles & 50–950 ramp

primary
#331766
secondary
#7A9C3C
accent
#E642AC
background
#F7F5F9
surface
#EDE9F1
border
#C8C5CB
text
#08030D
muted
#7B787E

Preview Lab

Preview with #331766

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

Preview Lab → · Contrast checker → · Palette generator →

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