#331B5A#331B5A

#331B5A is a dark, moderate violet. Relative luminance 0.022; OKLCH L 29.3% C 0.108 H 296.7°. Best body text is #FFFFFF at 14.53:1 contrast (WCAG AA passes).

Color values

HEX#331B5A
RGBrgb(51, 27, 90)
HSLhsl(263, 54%, 23%)
HSVhsv(263, 70%, 35%)
CMYKcmyk(43.3%, 70%, 0%, 64.7%)
CIE-LABlab(16.63, 27.30, -33.71)
CIE-LCHlch(16.63, 43.38, 309.01°)
OKLaboklab(29.31% 0.0484 -0.0961)
OKLCHoklch(29.31% 0.108 296.7)
XYZxyz(3.6022, 2.2258, 9.9107)
Luminance0.0223 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B5A #425A1B
analogous
#1B225A #331B5A #521B5A
triadic
#331B5A #5A331B #1B5A33
tetradic
#331B5A #5A1B22 #425A1B #1B5A52
square
#331B5A #5A1B22 #425A1B #1B5A52
split-complementary
#331B5A #5A521B #225A1B
monochromatic
#0D0718 #180D2B #331B5A #4E2989 #6837B8

Accessibility & contrast

On white

14.53
#331B5A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#331B5A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B5A
14.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B5A#FFFFFF#000000##FFFFFF
##331B5A1.0014.531.4514.53
#FFFFFF14.531.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00295C
Deuteranopia (green-blind)
#002859
Tritanopia (blue-blind)
#292A37
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #331b5a;
/* rgb */ color: rgb(51, 27, 90);
/* oklch */ color: oklch(29.3% 0.108 296.7);
Tailwind
colors: {
  custom: {
    50: '#6e5989',
    500: '#331b5a',
    950: '#000000',
  },
}
SCSS
$custom: #331b5a;
$custom-light: #6e5989;
$custom-dark: #000000;
JSON
{
  "hex": "#331b5a",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 90
  },
  "hsl": {
    "h": 262.857,
    "s": 53.846,
    "l": 22.941
  },
  "oklch": {
    "l": 0.29314,
    "c": 0.10761,
    "h": 296.7
  },
  "luminance": 0.02226
}

Semantic roles & 50–950 ramp

primary
#331B5A
secondary
#729041
accent
#DD4BA5
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07030B
muted
#7A787C

Preview Lab

Preview with #331B5A

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

Preview Lab → · Contrast checker → · Palette generator →

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