#331B58#331B58

#331B58 is a dark, moderate violet. Relative luminance 0.022; OKLCH L 29.1% C 0.105 H 297.6°. Best body text is #FFFFFF at 14.60:1 contrast (WCAG AA passes).

Color values

HEX#331B58
RGBrgb(51, 27, 88)
HSLhsl(264, 53%, 23%)
HSVhsv(264, 69%, 35%)
CMYKcmyk(42%, 69.3%, 0%, 65.5%)
CIE-LABlab(16.47, 26.70, -32.63)
CIE-LCHlch(16.47, 42.16, 309.29°)
OKLaboklab(29.14% 0.0486 -0.093)
OKLCHoklch(29.14% 0.105 297.6)
XYZxyz(3.5182, 2.1922, 9.4684)
Luminance0.0219 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B58 #40581B
analogous
#1B2158 #331B58 #521B58
triadic
#331B58 #58331B #1B5833
tetradic
#331B58 #581B21 #40581B #1B5852
square
#331B58 #581B21 #40581B #1B5852
split-complementary
#331B58 #58521B #21581B
monochromatic
#0E0717 #180D29 #331B58 #4E2987 #6938B6

Accessibility & contrast

On white

14.60
#331B58 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.44
#331B58 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B58
14.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B58#FFFFFF#000000##FFFFFF
##331B581.0014.601.4414.60
#FFFFFF14.601.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00295A
Deuteranopia (green-blind)
#002857
Tritanopia (blue-blind)
#2A2936
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #331b58;
/* rgb */ color: rgb(51, 27, 88);
/* oklch */ color: oklch(29.1% 0.105 297.6);
Tailwind
colors: {
  custom: {
    50: '#6e5988',
    500: '#331b58',
    950: '#000000',
  },
}
SCSS
$custom: #331b58;
$custom-light: #6e5988;
$custom-dark: #000000;
JSON
{
  "hex": "#331b58",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 88
  },
  "hsl": {
    "h": 263.607,
    "s": 53.043,
    "l": 22.549
  },
  "oklch": {
    "l": 0.29142,
    "c": 0.1049,
    "h": 297.6
  },
  "luminance": 0.02192
}

Semantic roles & 50–950 ramp

primary
#331B58
secondary
#708E41
accent
#DC4BA3
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07030B
muted
#7A787C

Preview Lab

Preview with #331B58

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

Preview Lab → · Contrast checker → · Palette generator →

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