#331B7D#331B7D

#331B7D is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.7% C 0.153 H 285.5°. Best body text is #FFFFFF at 13.18:1 contrast (WCAG AA passes).

Color values

HEX#331B7D
RGBrgb(51, 27, 125)
HSLhsl(255, 64%, 30%)
HSVhsv(255, 78%, 49%)
CMYKcmyk(59.2%, 78.4%, 0%, 51%)
CIE-LABlab(19.92, 38.09, -51.16)
CIE-LCHlch(19.92, 63.79, 306.67°)
OKLaboklab(32.66% 0.0408 -0.1473)
OKLCHoklch(32.66% 0.153 285.5)
XYZxyz(5.4577, 2.9680, 19.6834)
Luminance0.0297 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B7D #657D1B
analogous
#1B347D #331B7D #641B7D
triadic
#331B7D #7D331B #1B7D33
tetradic
#331B7D #7D1B34 #657D1B #1B7D64
square
#331B7D #7D1B34 #657D1B #1B7D64
split-complementary
#331B7D #7D641B #347D1B
monochromatic
#0A0519 #1E104B #331B7D #4826AF #623DD5

Accessibility & contrast

On white

13.18
#331B7D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#331B7D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B7D
13.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B7D#FFFFFF#000000##FFFFFF
##331B7D1.0013.181.5913.18
#FFFFFF13.181.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003380
Deuteranopia (green-blind)
#002D7B
Tritanopia (blue-blind)
#0D374B
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331b7d;
/* rgb */ color: rgb(51, 27, 125);
/* oklch */ color: oklch(32.7% 0.153 285.5);
Tailwind
colors: {
  custom: {
    50: '#745aa4',
    500: '#331b7d',
    950: '#000000',
  },
}
SCSS
$custom: #331b7d;
$custom-light: #745aa4;
$custom-dark: #000000;
JSON
{
  "hex": "#331b7d",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 125
  },
  "hsl": {
    "h": 254.694,
    "s": 64.474,
    "l": 29.804
  },
  "oklch": {
    "l": 0.32661,
    "c": 0.15288,
    "h": 285.5
  },
  "luminance": 0.02968
}

Semantic roles & 50–950 ramp

primary
#331B7D
secondary
#96B143
accent
#E740BF
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331B7D

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

Preview Lab → · Contrast checker → · Palette generator →

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