#331E57#331E57

#331E57 is a dark, moderate violet. Relative luminance 0.023; OKLCH L 29.6% C 0.099 H 296.9°. Best body text is #FFFFFF at 14.34:1 contrast (WCAG AA passes).

Color values

HEX#331E57
RGBrgb(51, 30, 87)
HSLhsl(262, 49%, 23%)
HSVhsv(262, 66%, 34%)
CMYKcmyk(41.4%, 65.5%, 0%, 65.9%)
CIE-LABlab(17.09, 24.51, -30.96)
CIE-LCHlch(17.09, 39.49, 308.37°)
OKLaboklab(29.57% 0.0447 -0.088)
OKLCHoklch(29.57% 0.099 296.9)
XYZxyz(3.5494, 2.3204, 9.2759)
Luminance0.0232 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E57 #42571E
analogous
#1E2557 #331E57 #4F1E57
triadic
#331E57 #57331E #1E5733
tetradic
#331E57 #571E25 #42571E #1E574F
square
#331E57 #571E25 #42571E #1E574F
split-complementary
#331E57 #574F1E #25571E
monochromatic
#0D0817 #180E29 #331E57 #4E2E85 #683DB2

Accessibility & contrast

On white

14.34
#331E57 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#331E57 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331E57
14.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E57#FFFFFF#000000##FFFFFF
##331E571.0014.341.4614.34
#FFFFFF14.341.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A59
Deuteranopia (green-blind)
#052956
Tritanopia (blue-blind)
#2A2A37
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #331e57;
/* rgb */ color: rgb(51, 30, 87);
/* oklch */ color: oklch(29.6% 0.099 296.9);
Tailwind
colors: {
  custom: {
    50: '#6e5b87',
    500: '#331e57',
    950: '#000000',
  },
}
SCSS
$custom: #331e57;
$custom-light: #6e5b87;
$custom-dark: #000000;
JSON
{
  "hex": "#331e57",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 87
  },
  "hsl": {
    "h": 262.105,
    "s": 48.718,
    "l": 22.941
  },
  "oklch": {
    "l": 0.29568,
    "c": 0.09874,
    "h": 296.9
  },
  "luminance": 0.0232
}

Semantic roles & 50–950 ramp

primary
#331E57
secondary
#728C45
accent
#D850A6
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07040B
muted
#7A797C

Preview Lab

Preview with #331E57

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

Preview Lab → · Contrast checker → · Palette generator →

#331E57 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva