#331BA6#331BA6

#331BA6 is a dark, highly saturated violet. Relative luminance 0.042; OKLCH L 37.1% C 0.202 H 278.0°. Best body text is #FFFFFF at 11.36:1 contrast (WCAG AA passes).

Color values

HEX#331BA6
RGBrgb(51, 27, 166)
HSLhsl(250, 72%, 38%)
HSVhsv(250, 84%, 65%)
CMYKcmyk(69.3%, 83.7%, 0%, 34.9%)
CIE-LABlab(24.45, 50.45, -69.11)
CIE-LCHlch(24.45, 85.56, 306.13°)
OKLaboklab(37.15% 0.0281 -0.1996)
OKLCHoklch(37.15% 0.202 278)
XYZxyz(8.6379, 4.2401, 36.4322)
Luminance0.0424 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331BA6 #8EA61B
analogous
#1B48A6 #331BA6 #791BA6
triadic
#331BA6 #A6331B #1BA633
tetradic
#331BA6 #A61B48 #8EA61B #1BA679
square
#331BA6 #A61B48 #8EA61B #1BA679
split-complementary
#331BA6 #A6791B #48A61B
monochromatic
#130A3D #231271 #331BA6 #4324DB #7058E4

Accessibility & contrast

On white

11.36
#331BA6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#331BA6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331BA6
11.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331BA6#FFFFFF#000000##FFFFFF
##331BA61.0011.361.8511.36
#FFFFFF11.361.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003FAA
Deuteranopia (green-blind)
#0034A4
Tritanopia (blue-blind)
#004763
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #331ba6;
/* rgb */ color: rgb(51, 27, 166);
/* oklch */ color: oklch(37.1% 0.202 278.0);
Tailwind
colors: {
  custom: {
    50: '#7d5dc2',
    500: '#331ba6',
    950: '#000000',
  },
}
SCSS
$custom: #331ba6;
$custom-light: #7d5dc2;
$custom-dark: #000000;
JSON
{
  "hex": "#331ba6",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 166
  },
  "hsl": {
    "h": 250.36,
    "s": 72.021,
    "l": 37.843
  },
  "oklch": {
    "l": 0.3715,
    "c": 0.20157,
    "h": 278
  },
  "luminance": 0.04241
}

Semantic roles & 50–950 ramp

primary
#331BA6
secondary
#B4C756
accent
#EF39CF
background
#F8F5FC
surface
#EFE9F8
border
#CAC5D1
text
#0B0513
muted
#7C7982

Preview Lab

Preview with #331BA6

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

Preview Lab → · Contrast checker → · Palette generator →

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