#331B98#331B98

#331B98 is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.6% C 0.185 H 280.1°. Best body text is #FFFFFF at 11.99:1 contrast (WCAG AA passes).

Color values

HEX#331B98
RGBrgb(51, 27, 152)
HSLhsl(252, 70%, 35%)
HSVhsv(252, 82%, 60%)
CMYKcmyk(66.4%, 82.2%, 0%, 40.4%)
CIE-LABlab(22.84, 46.30, -63.22)
CIE-LCHlch(22.84, 78.36, 306.22°)
OKLaboklab(35.57% 0.0325 -0.1825)
OKLCHoklch(35.57% 0.185 280.1)
XYZxyz(7.4229, 3.7541, 30.0331)
Luminance0.0376 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B98 #80981B
analogous
#1B4298 #331B98 #711B98
triadic
#331B98 #98331B #1B9833
tetradic
#331B98 #981B42 #80981B #1B9871
square
#331B98 #981B42 #80981B #1B9871
split-complementary
#331B98 #98711B #42981B
monochromatic
#100930 #221264 #331B98 #4424CC #6A4EE0

Accessibility & contrast

On white

11.99
#331B98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#331B98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B98
11.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B98#FFFFFF#000000##FFFFFF
##331B981.0011.991.7511.99
#FFFFFF11.991.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF11.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B9B
Deuteranopia (green-blind)
#003296
Tritanopia (blue-blind)
#00425A
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #331b98;
/* rgb */ color: rgb(51, 27, 152);
/* oklch */ color: oklch(35.6% 0.185 280.1);
Tailwind
colors: {
  custom: {
    50: '#7a5cb8',
    500: '#331b98',
    950: '#000000',
  },
}
SCSS
$custom: #331b98;
$custom-light: #7a5cb8;
$custom-dark: #000000;
JSON
{
  "hex": "#331b98",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 152
  },
  "hsl": {
    "h": 251.52,
    "s": 69.832,
    "l": 35.098
  },
  "oklch": {
    "l": 0.3557,
    "c": 0.18539,
    "h": 280.1
  },
  "luminance": 0.03755
}

Semantic roles & 50–950 ramp

primary
#331B98
secondary
#ABC24D
accent
#ED3BCB
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0411
muted
#7C7980

Preview Lab

Preview with #331B98

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

Preview Lab → · Contrast checker → · Palette generator →

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