#331B75#331B75

#331B75 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.8% C 0.143 H 287.5°. Best body text is #FFFFFF at 13.51:1 contrast (WCAG AA passes).

Color values

HEX#331B75
RGBrgb(51, 27, 117)
HSLhsl(256, 63%, 28%)
HSVhsv(256, 77%, 46%)
CMYKcmyk(56.4%, 76.9%, 0%, 54.1%)
CIE-LABlab(19.11, 35.62, -47.38)
CIE-LCHlch(19.11, 59.27, 306.94°)
OKLaboklab(31.85% 0.043 -0.1363)
OKLCHoklch(31.85% 0.143 287.5)
XYZxyz(4.9671, 2.7718, 17.0994)
Luminance0.0277 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B75 #5D751B
analogous
#1B3075 #331B75 #601B75
triadic
#331B75 #75331B #1B7533
tetradic
#331B75 #751B30 #5D751B #1B7560
square
#331B75 #751B30 #5D751B #1B7560
split-complementary
#331B75 #75601B #30751B
monochromatic
#0B0619 #1D1043 #331B75 #4926A7 #6239D1

Accessibility & contrast

On white

13.51
#331B75 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#331B75 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B75
13.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B75#FFFFFF#000000##FFFFFF
##331B751.0013.511.5513.51
#FFFFFF13.511.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003078
Deuteranopia (green-blind)
#002C73
Tritanopia (blue-blind)
#183446
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #331b75;
/* rgb */ color: rgb(51, 27, 117);
/* oklch */ color: oklch(31.8% 0.143 287.5);
Tailwind
colors: {
  custom: {
    50: '#735a9e',
    500: '#331b75',
    950: '#000000',
  },
}
SCSS
$custom: #331b75;
$custom-light: #735a9e;
$custom-dark: #000000;
JSON
{
  "hex": "#331b75",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 117
  },
  "hsl": {
    "h": 256,
    "s": 62.5,
    "l": 28.235
  },
  "oklch": {
    "l": 0.31846,
    "c": 0.14287,
    "h": 287.5
  },
  "luminance": 0.02772
}

Semantic roles & 50–950 ramp

primary
#331B75
secondary
#8EA942
accent
#E642BA
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040E
muted
#7B797E

Preview Lab

Preview with #331B75

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

Preview Lab → · Contrast checker → · Palette generator →

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