#331777#331777

#331777 is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.5% C 0.150 H 287.8°. Best body text is #FFFFFF at 13.73:1 contrast (WCAG AA passes).

Color values

HEX#331777
RGBrgb(51, 23, 119)
HSLhsl(258, 68%, 28%)
HSVhsv(258, 81%, 47%)
CMYKcmyk(57.1%, 80.7%, 0%, 53.3%)
CIE-LABlab(18.58, 38.32, -49.53)
CIE-LCHlch(18.58, 62.62, 307.73°)
OKLaboklab(31.54% 0.0456 -0.1425)
OKLCHoklch(31.54% 0.15 287.8)
XYZxyz(5.0004, 2.6482, 17.6969)
Luminance0.0265 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331777 #5B7717
analogous
#172B77 #331777 #631777
triadic
#331777 #773317 #177733
tetradic
#331777 #77172B #5B7717 #177763
square
#331777 #77172B #5B7717 #177763
split-complementary
#331777 #776317 #2B7717
monochromatic
#0B051A #1D0D44 #331777 #4921AA #6231D7

Accessibility & contrast

On white

13.73
#331777 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#331777 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331777
13.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331777#FFFFFF#000000##FFFFFF
##3317771.0013.731.5313.73
#FFFFFF13.731.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7A
Deuteranopia (green-blind)
#002B75
Tritanopia (blue-blind)
#163347
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #331777;
/* rgb */ color: rgb(51, 23, 119);
/* oklch */ color: oklch(31.5% 0.150 287.8);
Tailwind
colors: {
  custom: {
    50: '#74589f',
    500: '#331777',
    950: '#000000',
  },
}
SCSS
$custom: #331777;
$custom-light: #74589f;
$custom-dark: #000000;
JSON
{
  "hex": "#331777",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 119
  },
  "hsl": {
    "h": 257.5,
    "s": 67.606,
    "l": 27.843
  },
  "oklch": {
    "l": 0.31536,
    "c": 0.14967,
    "h": 287.8
  },
  "luminance": 0.02649
}

Semantic roles & 50–950 ramp

primary
#331777
secondary
#8CAC3E
accent
#EA3DB8
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09030F
muted
#7B787E

Preview Lab

Preview with #331777

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

Preview Lab → · Contrast checker → · Palette generator →

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