#331756#331756

#331756 is a dark, moderate violet. Relative luminance 0.020; OKLCH L 28.3% C 0.108 H 299.8°. Best body text is #FFFFFF at 15.03:1 contrast (WCAG AA passes).

Color values

HEX#331756
RGBrgb(51, 23, 86)
HSLhsl(267, 58%, 21%)
HSVhsv(267, 73%, 34%)
CMYKcmyk(40.7%, 73.3%, 0%, 66.3%)
CIE-LABlab(15.43, 28.49, -32.97)
CIE-LCHlch(15.43, 43.57, 310.83°)
OKLaboklab(28.34% 0.0539 -0.0939)
OKLCHoklch(28.34% 0.108 299.8)
XYZxyz(3.3509, 1.9885, 9.0096)
Luminance0.0199 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331756 #3A5617
analogous
#171B56 #331756 #531756
triadic
#331756 #563317 #175633
tetradic
#331756 #56171B #3A5617 #175653
square
#331756 #56171B #3A5617 #175653
split-complementary
#331756 #565317 #1B5617
monochromatic
#0E0618 #160A26 #331756 #502486 #6C31B7

Accessibility & contrast

On white

15.03
#331756 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.40
#331756 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331756
15.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331756#FFFFFF#000000##FFFFFF
##3317561.0015.031.4015.03
#FFFFFF15.031.0021.001.00
#0000001.4021.001.0021.00
##FFFFFF15.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002658
Deuteranopia (green-blind)
#002655
Tritanopia (blue-blind)
#2B2634
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #331756;
/* rgb */ color: rgb(51, 23, 86);
/* oklch */ color: oklch(28.3% 0.108 299.8);
Tailwind
colors: {
  custom: {
    50: '#6e5686',
    500: '#331756',
    950: '#000000',
  },
}
SCSS
$custom: #331756;
$custom-light: #6e5686;
$custom-dark: #000000;
JSON
{
  "hex": "#331756",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 86
  },
  "hsl": {
    "h": 266.667,
    "s": 57.798,
    "l": 21.373
  },
  "oklch": {
    "l": 0.28342,
    "c": 0.1083,
    "h": 299.8
  },
  "luminance": 0.01988
}

Semantic roles & 50–950 ramp

primary
#331756
secondary
#698D3C
accent
#E1479C
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07030B
muted
#7A787C

Preview Lab

Preview with #331756

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

Preview Lab → · Contrast checker → · Palette generator →

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