#331B6F#331B6F

#331B6F is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.3% C 0.135 H 289.2°. Best body text is #FFFFFF at 13.75:1 contrast (WCAG AA passes).

Color values

HEX#331B6F
RGBrgb(51, 27, 111)
HSLhsl(257, 61%, 27%)
HSVhsv(257, 76%, 44%)
CMYKcmyk(54.1%, 75.7%, 0%, 56.5%)
CIE-LABlab(18.52, 33.76, -44.46)
CIE-LCHlch(18.52, 55.83, 307.21°)
OKLaboklab(31.25% 0.0445 -0.1277)
OKLCHoklch(31.25% 0.135 289.2)
XYZxyz(4.6256, 2.6352, 15.3008)
Luminance0.0263 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B6F #576F1B
analogous
#1B2D6F #331B6F #5D1B6F
triadic
#331B6F #6F331B #1B6F33
tetradic
#331B6F #6F1B2D #576F1B #1B6F5D
square
#331B6F #6F1B2D #576F1B #1B6F5D
split-complementary
#331B6F #6F5D1B #2D6F1B
monochromatic
#0B0619 #1C0F3E #331B6F #4A27A0 #6236CE

Accessibility & contrast

On white

13.75
#331B6F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#331B6F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B6F
13.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B6F#FFFFFF#000000##FFFFFF
##331B6F1.0013.751.5313.75
#FFFFFF13.751.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F71
Deuteranopia (green-blind)
#002B6D
Tritanopia (blue-blind)
#1D3143
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #331b6f;
/* rgb */ color: rgb(51, 27, 111);
/* oklch */ color: oklch(31.3% 0.135 289.2);
Tailwind
colors: {
  custom: {
    50: '#725a99',
    500: '#331b6f',
    950: '#000000',
  },
}
SCSS
$custom: #331b6f;
$custom-light: #725a99;
$custom-dark: #000000;
JSON
{
  "hex": "#331b6f",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 111
  },
  "hsl": {
    "h": 257.143,
    "s": 60.87,
    "l": 27.059
  },
  "oklch": {
    "l": 0.31252,
    "c": 0.13524,
    "h": 289.2
  },
  "luminance": 0.02635
}

Semantic roles & 50–950 ramp

primary
#331B6F
secondary
#88A442
accent
#E444B6
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #331B6F

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

Preview Lab → · Contrast checker → · Palette generator →

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