#331BA7#331BA7

#331BA7 is a dark, highly saturated violet. Relative luminance 0.043; OKLCH L 37.3% C 0.203 H 277.9°. Best body text is #FFFFFF at 11.32:1 contrast (WCAG AA passes).

Color values

HEX#331BA7
RGBrgb(51, 27, 167)
HSLhsl(250, 72%, 38%)
HSVhsv(250, 84%, 65%)
CMYKcmyk(69.5%, 83.8%, 0%, 34.5%)
CIE-LABlab(24.57, 50.74, -69.52)
CIE-LCHlch(24.57, 86.07, 306.12°)
OKLaboklab(37.26% 0.0277 -0.2008)
OKLCHoklch(37.26% 0.203 277.9)
XYZxyz(8.7300, 4.2769, 36.9172)
Luminance0.0428 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331BA7 #8FA71B
analogous
#1B49A7 #331BA7 #791BA7
triadic
#331BA7 #A7331B #1BA733
tetradic
#331BA7 #A71B49 #8FA71B #1BA779
square
#331BA7 #A71B49 #8FA71B #1BA779
split-complementary
#331BA7 #A7791B #49A71B
monochromatic
#130A3E #231272 #331BA7 #4324DC #7058E4

Accessibility & contrast

On white

11.32
#331BA7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.86
#331BA7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331BA7
11.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331BA7#FFFFFF#000000##FFFFFF
##331BA71.0011.321.8611.32
#FFFFFF11.321.0021.001.00
#0000001.8621.001.0021.00
##FFFFFF11.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0040AB
Deuteranopia (green-blind)
#0034A5
Tritanopia (blue-blind)
#004863
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #331ba7;
/* rgb */ color: rgb(51, 27, 167);
/* oklch */ color: oklch(37.3% 0.203 277.9);
Tailwind
colors: {
  custom: {
    50: '#7d5dc3',
    500: '#331ba7',
    950: '#000000',
  },
}
SCSS
$custom: #331ba7;
$custom-light: #7d5dc3;
$custom-dark: #000000;
JSON
{
  "hex": "#331ba7",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 167
  },
  "hsl": {
    "h": 250.286,
    "s": 72.165,
    "l": 38.039
  },
  "oklch": {
    "l": 0.37264,
    "c": 0.20272,
    "h": 277.9
  },
  "luminance": 0.04278
}

Semantic roles & 50–950 ramp

primary
#331BA7
secondary
#B4C856
accent
#EF39D0
background
#F8F5FC
surface
#EFE9F8
border
#CAC5D1
text
#0B0513
muted
#7C7982

Preview Lab

Preview with #331BA7

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

Preview Lab → · Contrast checker → · Palette generator →

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