#331F4B#331F4B

#331F4B is a dark, moderate violet. Relative luminance 0.022; OKLCH L 28.8% C 0.080 H 302.7°. Best body text is #FFFFFF at 14.60:1 contrast (WCAG AA passes).

Color values

HEX#331F4B
RGBrgb(51, 31, 75)
HSLhsl(267, 42%, 21%)
HSVhsv(267, 59%, 29%)
CMYKcmyk(32%, 58.7%, 0%, 70.6%)
CIE-LABlab(16.46, 20.25, -23.82)
CIE-LCHlch(16.46, 31.26, 310.37°)
OKLaboklab(28.83% 0.0431 -0.0671)
OKLCHoklch(28.83% 0.08 302.7)
XYZxyz(3.1249, 2.1918, 6.9137)
Luminance0.0219 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F4B #374B1F
analogous
#1F214B #331F4B #491F4B
triadic
#331F4B #4B331F #1F4B33
tetradic
#331F4B #4B1F21 #374B1F #1F4B49
square
#331F4B #4B1F21 #374B1F #1F4B49
split-complementary
#331F4B #4B491F #214B1F
monochromatic
#0F0916 #160D20 #331F4B #503176 #6E43A2

Accessibility & contrast

On white

14.60
#331F4B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.44
#331F4B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F4B
14.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F4B#FFFFFF#000000##FFFFFF
##331F4B1.0014.601.4414.60
#FFFFFF14.601.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#10284C
Deuteranopia (green-blind)
#16294A
Tritanopia (blue-blind)
#2F2731
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #331f4b;
/* rgb */ color: rgb(51, 31, 75);
/* oklch */ color: oklch(28.8% 0.080 302.7);
Tailwind
colors: {
  custom: {
    50: '#6c5b7d',
    500: '#331f4b',
    950: '#000000',
  },
}
SCSS
$custom: #331f4b;
$custom-light: #6c5b7d;
$custom-dark: #000000;
JSON
{
  "hex": "#331f4b",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 75
  },
  "hsl": {
    "h": 267.273,
    "s": 41.509,
    "l": 20.784
  },
  "oklch": {
    "l": 0.2883,
    "c": 0.07973,
    "h": 302.7
  },
  "luminance": 0.02192
}

Semantic roles & 50–950 ramp

primary
#331F4B
secondary
#668046
accent
#D15699
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#07040A
muted
#7A797C

Preview Lab

Preview with #331F4B

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

Preview Lab → · Contrast checker → · Palette generator →

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