#331B6E#331B6E

#331B6E is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.2% C 0.134 H 289.5°. Best body text is #FFFFFF at 13.79:1 contrast (WCAG AA passes).

Color values

HEX#331B6E
RGBrgb(51, 27, 110)
HSLhsl(257, 61%, 27%)
HSVhsv(257, 75%, 43%)
CMYKcmyk(53.6%, 75.5%, 0%, 56.9%)
CIE-LABlab(18.42, 33.45, -43.97)
CIE-LCHlch(18.42, 55.25, 307.26°)
OKLaboklab(31.15% 0.0447 -0.1263)
OKLCHoklch(31.15% 0.134 289.5)
XYZxyz(4.5708, 2.6133, 15.0124)
Luminance0.0261 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B6E #566E1B
analogous
#1B2D6E #331B6E #5D1B6E
triadic
#331B6E #6E331B #1B6E33
tetradic
#331B6E #6E1B2D #566E1B #1B6E5D
square
#331B6E #6E1B2D #566E1B #1B6E5D
split-complementary
#331B6E #6E5D1B #2D6E1B
monochromatic
#0B0619 #1C0F3D #331B6E #4A279F #6236CE

Accessibility & contrast

On white

13.79
#331B6E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#331B6E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B6E
13.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B6E#FFFFFF#000000##FFFFFF
##331B6E1.0013.791.5213.79
#FFFFFF13.791.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F70
Deuteranopia (green-blind)
#002B6C
Tritanopia (blue-blind)
#1E3142
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #331b6e;
/* rgb */ color: rgb(51, 27, 110);
/* oklch */ color: oklch(31.2% 0.134 289.5);
Tailwind
colors: {
  custom: {
    50: '#725a98',
    500: '#331b6e',
    950: '#000000',
  },
}
SCSS
$custom: #331b6e;
$custom-light: #725a98;
$custom-dark: #000000;
JSON
{
  "hex": "#331b6e",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 110
  },
  "hsl": {
    "h": 257.349,
    "s": 60.584,
    "l": 26.863
  },
  "oklch": {
    "l": 0.31154,
    "c": 0.13396,
    "h": 289.5
  },
  "luminance": 0.02613
}

Semantic roles & 50–950 ramp

primary
#331B6E
secondary
#87A342
accent
#E444B6
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #331B6E

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

Preview Lab → · Contrast checker → · Palette generator →

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