#331B7F#331B7F

#331B7F is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.9% C 0.155 H 285.0°. Best body text is #FFFFFF at 13.09:1 contrast (WCAG AA passes).

Color values

HEX#331B7F
RGBrgb(51, 27, 127)
HSLhsl(254, 65%, 30%)
HSVhsv(254, 79%, 50%)
CMYKcmyk(59.8%, 78.7%, 0%, 50.2%)
CIE-LABlab(20.12, 38.71, -52.09)
CIE-LCHlch(20.12, 64.90, 306.61°)
OKLaboklab(32.87% 0.0402 -0.1501)
OKLCHoklch(32.87% 0.155 285)
XYZxyz(5.5868, 3.0196, 20.3630)
Luminance0.0302 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B7F #677F1B
analogous
#1B357F #331B7F #651B7F
triadic
#331B7F #7F331B #1B7F33
tetradic
#331B7F #7F1B35 #677F1B #1B7F65
square
#331B7F #7F1B35 #677F1B #1B7F65
split-complementary
#331B7F #7F651B #357F1B
monochromatic
#0A061A #1F104D #331B7F #4726B1 #633ED6

Accessibility & contrast

On white

13.09
#331B7F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#331B7F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B7F
13.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B7F#FFFFFF#000000##FFFFFF
##331B7F1.0013.091.6013.09
#FFFFFF13.091.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003382
Deuteranopia (green-blind)
#002D7D
Tritanopia (blue-blind)
#09384C
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331b7f;
/* rgb */ color: rgb(51, 27, 127);
/* oklch */ color: oklch(32.9% 0.155 285.0);
Tailwind
colors: {
  custom: {
    50: '#755ba5',
    500: '#331b7f',
    950: '#000000',
  },
}
SCSS
$custom: #331b7f;
$custom-light: #755ba5;
$custom-dark: #000000;
JSON
{
  "hex": "#331b7f",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 127
  },
  "hsl": {
    "h": 254.4,
    "s": 64.935,
    "l": 30.196
  },
  "oklch": {
    "l": 0.32869,
    "c": 0.15536,
    "h": 285
  },
  "luminance": 0.0302
}

Semantic roles & 50–950 ramp

primary
#331B7F
secondary
#98B343
accent
#E840C0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331B7F

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

Preview Lab → · Contrast checker → · Palette generator →

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