#331B66#331B66

#331B66 is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.4% C 0.124 H 292.1°. Best body text is #FFFFFF at 14.10:1 contrast (WCAG AA passes).

Color values

HEX#331B66
RGBrgb(51, 27, 102)
HSLhsl(259, 58%, 25%)
HSVhsv(259, 74%, 40%)
CMYKcmyk(50%, 73.5%, 0%, 60%)
CIE-LABlab(17.68, 30.98, -39.97)
CIE-LCHlch(17.68, 50.57, 307.78°)
OKLaboklab(30.39% 0.0464 -0.1145)
OKLCHoklch(30.39% 0.124 292.1)
XYZxyz(4.1548, 2.4468, 12.8212)
Luminance0.0245 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B66 #4E661B
analogous
#1B2866 #331B66 #581B66
triadic
#331B66 #66331B #1B6633
tetradic
#331B66 #661B28 #4E661B #1B6658
square
#331B66 #661B28 #4E661B #1B6658
split-complementary
#331B66 #66581B #28661B
monochromatic
#0C0618 #1B0E36 #331B66 #4B2896 #6335C7

Accessibility & contrast

On white

14.10
#331B66 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#331B66 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B66
14.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B66#FFFFFF#000000##FFFFFF
##331B661.0014.101.4914.10
#FFFFFF14.101.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C68
Deuteranopia (green-blind)
#002A65
Tritanopia (blue-blind)
#232E3E
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #331b66;
/* rgb */ color: rgb(51, 27, 102);
/* oklch */ color: oklch(30.4% 0.124 292.1);
Tailwind
colors: {
  custom: {
    50: '#705992',
    500: '#331b66',
    950: '#000000',
  },
}
SCSS
$custom: #331b66;
$custom-light: #705992;
$custom-dark: #000000;
JSON
{
  "hex": "#331b66",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 102
  },
  "hsl": {
    "h": 259.2,
    "s": 58.14,
    "l": 25.294
  },
  "oklch": {
    "l": 0.30392,
    "c": 0.12358,
    "h": 292.1
  },
  "luminance": 0.02447
}

Semantic roles & 50–950 ramp

primary
#331B66
secondary
#7F9B41
accent
#E146B0
background
#F7F5F9
surface
#EDE9F1
border
#C8C5CB
text
#08040D
muted
#7B797E

Preview Lab

Preview with #331B66

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

Preview Lab → · Contrast checker → · Palette generator →

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