#331B7E#331B7E

#331B7E is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.8% C 0.154 H 285.2°. Best body text is #FFFFFF at 13.13:1 contrast (WCAG AA passes).

Color values

HEX#331B7E
RGBrgb(51, 27, 126)
HSLhsl(255, 65%, 30%)
HSVhsv(255, 79%, 49%)
CMYKcmyk(59.5%, 78.6%, 0%, 50.6%)
CIE-LABlab(20.02, 38.40, -51.63)
CIE-LCHlch(20.02, 64.34, 306.64°)
OKLaboklab(32.77% 0.0405 -0.1487)
OKLCHoklch(32.77% 0.154 285.2)
XYZxyz(5.5219, 2.9937, 20.0215)
Luminance0.0299 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B7E #667E1B
analogous
#1B357E #331B7E #641B7E
triadic
#331B7E #7E331B #1B7E33
tetradic
#331B7E #7E1B35 #667E1B #1B7E64
square
#331B7E #7E1B35 #667E1B #1B7E64
split-complementary
#331B7E #7E641B #357E1B
monochromatic
#0A0519 #1F104C #331B7E #4726B0 #633ED6

Accessibility & contrast

On white

13.13
#331B7E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#331B7E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B7E
13.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B7E#FFFFFF#000000##FFFFFF
##331B7E1.0013.131.6013.13
#FFFFFF13.131.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003381
Deuteranopia (green-blind)
#002D7C
Tritanopia (blue-blind)
#0B374B
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331b7e;
/* rgb */ color: rgb(51, 27, 126);
/* oklch */ color: oklch(32.8% 0.154 285.2);
Tailwind
colors: {
  custom: {
    50: '#745ba4',
    500: '#331b7e',
    950: '#000000',
  },
}
SCSS
$custom: #331b7e;
$custom-light: #745ba4;
$custom-dark: #000000;
JSON
{
  "hex": "#331b7e",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 126
  },
  "hsl": {
    "h": 254.545,
    "s": 64.706,
    "l": 30
  },
  "oklch": {
    "l": 0.32765,
    "c": 0.15412,
    "h": 285.2
  },
  "luminance": 0.02994
}

Semantic roles & 50–950 ramp

primary
#331B7E
secondary
#97B243
accent
#E840BF
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331B7E

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

Preview Lab → · Contrast checker → · Palette generator →

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