#331B5D#331B5D

#331B5D is a dark, moderate violet. Relative luminance 0.023; OKLCH L 29.6% C 0.112 H 295.4°. Best body text is #FFFFFF at 14.43:1 contrast (WCAG AA passes).

Color values

HEX#331B5D
RGBrgb(51, 27, 93)
HSLhsl(262, 55%, 24%)
HSVhsv(262, 71%, 36%)
CMYKcmyk(45.2%, 71%, 0%, 63.5%)
CIE-LABlab(16.88, 28.21, -35.30)
CIE-LCHlch(16.88, 45.19, 308.63°)
OKLaboklab(29.58% 0.048 -0.1008)
OKLCHoklch(29.58% 0.112 295.4)
XYZxyz(3.7324, 2.2779, 10.5968)
Luminance0.0228 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B5D #455D1B
analogous
#1B245D #331B5D #541B5D
triadic
#331B5D #5D331B #1B5D33
tetradic
#331B5D #5D1B24 #455D1B #1B5D54
square
#331B5D #5D1B24 #455D1B #1B5D54
split-complementary
#331B5D #5D541B #245D1B
monochromatic
#0D0718 #190D2E #331B5D #4D298C #6737BC

Accessibility & contrast

On white

14.43
#331B5D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#331B5D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B5D
14.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B5D#FFFFFF#000000##FFFFFF
##331B5D1.0014.431.4614.43
#FFFFFF14.431.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A5F
Deuteranopia (green-blind)
#00295C
Tritanopia (blue-blind)
#282B39
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #331b5d;
/* rgb */ color: rgb(51, 27, 93);
/* oklch */ color: oklch(29.6% 0.112 295.4);
Tailwind
colors: {
  custom: {
    50: '#6f598b',
    500: '#331b5d',
    950: '#000000',
  },
}
SCSS
$custom: #331b5d;
$custom-light: #6f598b;
$custom-dark: #000000;
JSON
{
  "hex": "#331b5d",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 93
  },
  "hsl": {
    "h": 261.818,
    "s": 55,
    "l": 23.529
  },
  "oklch": {
    "l": 0.29575,
    "c": 0.11164,
    "h": 295.4
  },
  "luminance": 0.02278
}

Semantic roles & 50–950 ramp

primary
#331B5D
secondary
#759341
accent
#DE49A8
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#08030C
muted
#7B787D

Preview Lab

Preview with #331B5D

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

Preview Lab → · Contrast checker → · Palette generator →

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