#331778#331778

#331778 is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.6% C 0.151 H 287.5°. Best body text is #FFFFFF at 13.68:1 contrast (WCAG AA passes).

Color values

HEX#331778
RGBrgb(51, 23, 120)
HSLhsl(257, 68%, 28%)
HSVhsv(257, 81%, 47%)
CMYKcmyk(57.5%, 80.8%, 0%, 52.9%)
CIE-LABlab(18.68, 38.62, -50.00)
CIE-LCHlch(18.68, 63.18, 307.68°)
OKLaboklab(31.64% 0.0453 -0.1439)
OKLCHoklch(31.64% 0.151 287.5)
XYZxyz(5.0608, 2.6724, 18.0148)
Luminance0.0267 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331778 #5C7817
analogous
#172B78 #331778 #631778
triadic
#331778 #783317 #177833
tetradic
#331778 #78172B #5C7817 #177863
square
#331778 #78172B #5C7817 #177863
split-complementary
#331778 #786317 #2B7817
monochromatic
#0B051A #1D0D45 #331778 #4921AB #6232D8

Accessibility & contrast

On white

13.68
#331778 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331778
13.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331778#FFFFFF#000000##FFFFFF
##3317781.0013.681.5313.68
#FFFFFF13.681.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307B
Deuteranopia (green-blind)
#002B76
Tritanopia (blue-blind)
#153347
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #331778;
/* rgb */ color: rgb(51, 23, 120);
/* oklch */ color: oklch(31.6% 0.151 287.5);
Tailwind
colors: {
  custom: {
    50: '#7458a0',
    500: '#331778',
    950: '#000000',
  },
}
SCSS
$custom: #331778;
$custom-light: #7458a0;
$custom-dark: #000000;
JSON
{
  "hex": "#331778",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 120
  },
  "hsl": {
    "h": 257.32,
    "s": 67.832,
    "l": 28.039
  },
  "oklch": {
    "l": 0.31641,
    "c": 0.15088,
    "h": 287.5
  },
  "luminance": 0.02673
}

Semantic roles & 50–950 ramp

primary
#331778
secondary
#8DAD3E
accent
#EB3DB9
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#09030F
muted
#7B787F

Preview Lab

Preview with #331778

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

Preview Lab → · Contrast checker → · Palette generator →

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