#331F4D#331F4D

#331F4D is a dark, moderate violet. Relative luminance 0.022; OKLCH L 29.0% C 0.083 H 301.5°. Best body text is #FFFFFF at 14.54:1 contrast (WCAG AA passes).

Color values

HEX#331F4D
RGBrgb(51, 31, 77)
HSLhsl(266, 43%, 21%)
HSVhsv(266, 60%, 30%)
CMYKcmyk(33.8%, 59.7%, 0%, 69.8%)
CIE-LABlab(16.60, 20.84, -24.97)
CIE-LCHlch(16.60, 32.52, 309.85°)
OKLaboklab(28.98% 0.0432 -0.0705)
OKLCHoklch(28.98% 0.083 301.5)
XYZxyz(3.1945, 2.2196, 7.2799)
Luminance0.0222 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F4D #394D1F
analogous
#1F224D #331F4D #4A1F4D
triadic
#331F4D #4D331F #1F4D33
tetradic
#331F4D #4D1F22 #394D1F #1F4D4A
square
#331F4D #4D1F22 #394D1F #1F4D4A
split-complementary
#331F4D #4D4A1F #224D1F
monochromatic
#0E0916 #160D21 #331F4D #503179 #6D42A4

Accessibility & contrast

On white

14.54
#331F4D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331F4D
14.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F4D#FFFFFF#000000##FFFFFF
##331F4D1.0014.541.4414.54
#FFFFFF14.541.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0E294F
Deuteranopia (green-blind)
#14294C
Tritanopia (blue-blind)
#2E2832
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #331f4d;
/* rgb */ color: rgb(51, 31, 77);
/* oklch */ color: oklch(29.0% 0.083 301.5);
Tailwind
colors: {
  custom: {
    50: '#6c5b7f',
    500: '#331f4d',
    950: '#000000',
  },
}
SCSS
$custom: #331f4d;
$custom-light: #6c5b7f;
$custom-dark: #000000;
JSON
{
  "hex": "#331f4d",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 77
  },
  "hsl": {
    "h": 266.087,
    "s": 42.593,
    "l": 21.176
  },
  "oklch": {
    "l": 0.28976,
    "c": 0.08265,
    "h": 301.5
  },
  "luminance": 0.0222
}

Semantic roles & 50–950 ramp

primary
#331F4D
secondary
#688246
accent
#D2559C
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#07040A
muted
#7A797C

Preview Lab

Preview with #331F4D

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

Preview Lab → · Contrast checker → · Palette generator →

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