#331958#331958

#331958 is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.8% C 0.108 H 298.3°. Best body text is #FFFFFF at 14.78:1 contrast (WCAG AA passes).

Color values

HEX#331958
RGBrgb(51, 25, 88)
HSLhsl(265, 56%, 22%)
HSVhsv(265, 72%, 35%)
CMYKcmyk(42%, 71.6%, 0%, 65.5%)
CIE-LABlab(16.02, 27.91, -33.35)
CIE-LCHlch(16.02, 43.49, 309.92°)
OKLaboklab(28.82% 0.0511 -0.0951)
OKLCHoklch(28.82% 0.108 298.3)
XYZxyz(3.4739, 2.1036, 9.4536)
Luminance0.0210 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331958 #3E5819
analogous
#191F58 #331958 #531958
triadic
#331958 #583319 #195833
tetradic
#331958 #58191F #3E5819 #195853
square
#331958 #58191F #3E5819 #195853
split-complementary
#331958 #585319 #1F5819
monochromatic
#0E0718 #170B28 #331958 #4F2788 #6A34B7

Accessibility & contrast

On white

14.78
#331958 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#331958 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331958
14.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331958#FFFFFF#000000##FFFFFF
##3319581.0014.781.4214.78
#FFFFFF14.781.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00285A
Deuteranopia (green-blind)
#002757
Tritanopia (blue-blind)
#2A2836
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331958;
/* rgb */ color: rgb(51, 25, 88);
/* oklch */ color: oklch(28.8% 0.108 298.3);
Tailwind
colors: {
  custom: {
    50: '#6e5788',
    500: '#331958',
    950: '#000000',
  },
}
SCSS
$custom: #331958;
$custom-light: #6e5788;
$custom-dark: #000000;
JSON
{
  "hex": "#331958",
  "rgb": {
    "r": 51,
    "g": 25,
    "b": 88
  },
  "hsl": {
    "h": 264.762,
    "s": 55.752,
    "l": 22.157
  },
  "oklch": {
    "l": 0.28823,
    "c": 0.10794,
    "h": 298.3
  },
  "luminance": 0.02104
}

Semantic roles & 50–950 ramp

primary
#331958
secondary
#6D8E3E
accent
#DF49A1
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07030B
muted
#7A787C

Preview Lab

Preview with #331958

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

Preview Lab → · Contrast checker → · Palette generator →

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