#331F6A#331F6A

#331F6A is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.4% C 0.123 H 289.6°. Best body text is #FFFFFF at 13.59:1 contrast (WCAG AA passes).

Color values

HEX#331F6A
RGBrgb(51, 31, 106)
HSLhsl(256, 55%, 27%)
HSVhsv(256, 71%, 42%)
CMYKcmyk(51.9%, 70.8%, 0%, 58.4%)
CIE-LABlab(18.90, 29.84, -40.58)
CIE-LCHlch(18.90, 50.37, 306.33°)
OKLaboklab(31.38% 0.0414 -0.1163)
OKLCHoklch(31.38% 0.124 289.6)
XYZxyz(4.4560, 2.7242, 13.9239)
Luminance0.0272 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F6A #566A1F
analogous
#1F316A #331F6A #591F6A
triadic
#331F6A #6A331F #1F6A33
tetradic
#331F6A #6A1F31 #566A1F #1F6A59
square
#331F6A #6A1F31 #566A1F #1F6A59
split-complementary
#331F6A #6A591F #316A1F
monochromatic
#0B0718 #1C113B #331F6A #4A2D99 #623DC6

Accessibility & contrast

On white

13.59
#331F6A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#331F6A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F6A
13.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F6A#FFFFFF#000000##FFFFFF
##331F6A1.0013.591.5413.59
#FFFFFF13.591.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F6C
Deuteranopia (green-blind)
#002C68
Tritanopia (blue-blind)
#203241
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #331f6a;
/* rgb */ color: rgb(51, 31, 106);
/* oklch */ color: oklch(31.4% 0.123 289.6);
Tailwind
colors: {
  custom: {
    50: '#715c95',
    500: '#331f6a',
    950: '#000000',
  },
}
SCSS
$custom: #331f6a;
$custom-light: #715c95;
$custom-dark: #000000;
JSON
{
  "hex": "#331f6a",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 106
  },
  "hsl": {
    "h": 256,
    "s": 54.745,
    "l": 26.863
  },
  "oklch": {
    "l": 0.31383,
    "c": 0.1235,
    "h": 289.6
  },
  "luminance": 0.02724
}

Semantic roles & 50–950 ramp

primary
#331F6A
secondary
#879E47
accent
#DE4AB7
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040D
muted
#7B797E

Preview Lab

Preview with #331F6A

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

Preview Lab → · Contrast checker → · Palette generator →

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