#331B47#331B47

#331B47 is a dark, moderate violet. Relative luminance 0.019; OKLCH L 27.8% C 0.081 H 307.1°. Best body text is #FFFFFF at 15.12:1 contrast (WCAG AA passes).

Color values

HEX#331B47
RGBrgb(51, 27, 71)
HSLhsl(273, 45%, 19%)
HSVhsv(273, 62%, 28%)
CMYKcmyk(28.2%, 62%, 0%, 72.2%)
CIE-LABlab(15.18, 21.73, -23.11)
CIE-LCHlch(15.18, 31.72, 313.24°)
OKLaboklab(27.8% 0.0491 -0.065)
OKLCHoklch(27.8% 0.081 307.1)
XYZxyz(2.8943, 1.9426, 6.1825)
Luminance0.0194 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B47 #2F471B
analogous
#1D1B47 #331B47 #471B45
triadic
#331B47 #47331B #1B4733
tetradic
#331B47 #471D1B #2F471B #1B4547
square
#331B47 #471D1B #2F471B #1B4547
split-complementary
#331B47 #45471B #1B471D
monochromatic
#100816 #130A1B #331B47 #532C73 #733DA0

Accessibility & contrast

On white

15.12
#331B47 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.39
#331B47 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B47
15.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B47#FFFFFF#000000##FFFFFF
##331B471.0015.121.3915.12
#FFFFFF15.121.0021.001.00
#0000001.3921.001.0021.00
##FFFFFF15.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0C2548
Deuteranopia (green-blind)
#142646
Tritanopia (blue-blind)
#30232E
Achromatopsia (no color)
#262626

Design tokens & code

CSS
--color: #331b47;
/* rgb */ color: rgb(51, 27, 71);
/* oklch */ color: oklch(27.8% 0.081 307.1);
Tailwind
colors: {
  custom: {
    50: '#6c587a',
    500: '#331b47',
    950: '#000000',
  },
}
SCSS
$custom: #331b47;
$custom-light: #6c587a;
$custom-dark: #000000;
JSON
{
  "hex": "#331b47",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 71
  },
  "hsl": {
    "h": 272.727,
    "s": 44.898,
    "l": 19.216
  },
  "oklch": {
    "l": 0.27798,
    "c": 0.08147,
    "h": 307.1
  },
  "luminance": 0.01943
}

Semantic roles & 50–950 ramp

primary
#331B47
secondary
#5C7D41
accent
#D5538E
background
#F6F5F7
surface
#EBE9ED
border
#C6C5C8
text
#070309
muted
#7A787B

Preview Lab

Preview with #331B47

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

Preview Lab → · Contrast checker → · Palette generator →

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