#331B72#331B72

#331B72 is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.5% C 0.139 H 288.3°. Best body text is #FFFFFF at 13.63:1 contrast (WCAG AA passes).

Color values

HEX#331B72
RGBrgb(51, 27, 114)
HSLhsl(257, 62%, 28%)
HSVhsv(257, 76%, 45%)
CMYKcmyk(55.3%, 76.3%, 0%, 55.3%)
CIE-LABlab(18.81, 34.69, -45.93)
CIE-LCHlch(18.81, 57.56, 307.06°)
OKLaboklab(31.55% 0.0437 -0.132)
OKLCHoklch(31.55% 0.139 288.3)
XYZxyz(4.7935, 2.7023, 16.1854)
Luminance0.0270 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B72 #5A721B
analogous
#1B2E72 #331B72 #5F1B72
triadic
#331B72 #72331B #1B7233
tetradic
#331B72 #721B2E #5A721B #1B725F
square
#331B72 #721B2E #5A721B #1B725F
split-complementary
#331B72 #725F1B #2E721B
monochromatic
#0B0619 #1D0F41 #331B72 #4927A3 #6238D0

Accessibility & contrast

On white

13.63
#331B72 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#331B72 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B72
13.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B72#FFFFFF#000000##FFFFFF
##331B721.0013.631.5413.63
#FFFFFF13.631.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003075
Deuteranopia (green-blind)
#002B70
Tritanopia (blue-blind)
#1A3245
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #331b72;
/* rgb */ color: rgb(51, 27, 114);
/* oklch */ color: oklch(31.5% 0.139 288.3);
Tailwind
colors: {
  custom: {
    50: '#725a9b',
    500: '#331b72',
    950: '#000000',
  },
}
SCSS
$custom: #331b72;
$custom-light: #725a9b;
$custom-dark: #000000;
JSON
{
  "hex": "#331b72",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 114
  },
  "hsl": {
    "h": 256.552,
    "s": 61.702,
    "l": 27.647
  },
  "oklch": {
    "l": 0.31547,
    "c": 0.13908,
    "h": 288.3
  },
  "luminance": 0.02703
}

Semantic roles & 50–950 ramp

primary
#331B72
secondary
#8BA742
accent
#E543B8
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040E
muted
#7B797E

Preview Lab

Preview with #331B72

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

Preview Lab → · Contrast checker → · Palette generator →

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