#331B5F#331B5F

#331B5F is a dark, moderate violet. Relative luminance 0.023; OKLCH L 29.8% C 0.114 H 294.6°. Best body text is #FFFFFF at 14.36:1 contrast (WCAG AA passes).

Color values

HEX#331B5F
RGBrgb(51, 27, 95)
HSLhsl(261, 56%, 24%)
HSVhsv(261, 72%, 37%)
CMYKcmyk(46.3%, 71.6%, 0%, 62.7%)
CIE-LABlab(17.05, 28.82, -36.35)
CIE-LCHlch(17.05, 46.39, 308.41°)
OKLaboklab(29.75% 0.0477 -0.1039)
OKLCHoklch(29.75% 0.114 294.6)
XYZxyz(3.8222, 2.3138, 11.0695)
Luminance0.0231 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B5F #475F1B
analogous
#1B255F #331B5F #551B5F
triadic
#331B5F #5F331B #1B5F33
tetradic
#331B5F #5F1B25 #475F1B #1B5F55
square
#331B5F #5F1B25 #475F1B #1B5F55
split-complementary
#331B5F #5F551B #255F1B
monochromatic
#0D0718 #190D2F #331B5F #4D298F #6636BE

Accessibility & contrast

On white

14.36
#331B5F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#331B5F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B5F
14.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B5F#FFFFFF#000000##FFFFFF
##331B5F1.0014.361.4614.36
#FFFFFF14.361.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B61
Deuteranopia (green-blind)
#00295E
Tritanopia (blue-blind)
#272B3A
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #331b5f;
/* rgb */ color: rgb(51, 27, 95);
/* oklch */ color: oklch(29.8% 0.114 294.6);
Tailwind
colors: {
  custom: {
    50: '#6f598d',
    500: '#331b5f',
    950: '#000000',
  },
}
SCSS
$custom: #331b5f;
$custom-light: #6f598d;
$custom-dark: #000000;
JSON
{
  "hex": "#331b5f",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 95
  },
  "hsl": {
    "h": 261.176,
    "s": 55.738,
    "l": 23.922
  },
  "oklch": {
    "l": 0.29753,
    "c": 0.11433,
    "h": 294.6
  },
  "luminance": 0.02314
}

Semantic roles & 50–950 ramp

primary
#331B5F
secondary
#779541
accent
#DF49AA
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#08030C
muted
#7B787D

Preview Lab

Preview with #331B5F

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

Preview Lab → · Contrast checker → · Palette generator →

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