#331F7F#331F7F

#331F7F is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.4% C 0.151 H 284.2°. Best body text is #FFFFFF at 12.78:1 contrast (WCAG AA passes).

Color values

HEX#331F7F
RGBrgb(51, 31, 127)
HSLhsl(253, 61%, 31%)
HSVhsv(253, 76%, 50%)
CMYKcmyk(59.8%, 75.6%, 0%, 50.2%)
CIE-LABlab(20.89, 36.54, -50.83)
CIE-LCHlch(20.89, 62.60, 305.71°)
OKLaboklab(33.41% 0.0371 -0.1464)
OKLCHoklch(33.41% 0.151 284.2)
XYZxyz(5.6848, 3.2157, 20.3957)
Luminance0.0322 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F7F #6B7F1F
analogous
#1F3B7F #331F7F #631F7F
triadic
#331F7F #7F331F #1F7F33
tetradic
#331F7F #7F1F3B #6B7F1F #1F7F63
square
#331F7F #7F1F3B #6B7F1F #1F7F63
split-complementary
#331F7F #7F631F #3B7F1F
monochromatic
#0B071D #1F134E #331F7F #472BB0 #6446D2

Accessibility & contrast

On white

12.78
#331F7F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#331F7F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F7F
12.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F7F#FFFFFF#000000##FFFFFF
##331F7F1.0012.781.6412.78
#FFFFFF12.781.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003582
Deuteranopia (green-blind)
#002F7D
Tritanopia (blue-blind)
#08394D
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #331f7f;
/* rgb */ color: rgb(51, 31, 127);
/* oklch */ color: oklch(33.4% 0.151 284.2);
Tailwind
colors: {
  custom: {
    50: '#745da5',
    500: '#331f7f',
    950: '#000000',
  },
}
SCSS
$custom: #331f7f;
$custom-light: #745da5;
$custom-dark: #000000;
JSON
{
  "hex": "#331f7f",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 127
  },
  "hsl": {
    "h": 252.5,
    "s": 60.759,
    "l": 30.98
  },
  "oklch": {
    "l": 0.33408,
    "c": 0.15104,
    "h": 284.2
  },
  "luminance": 0.03216
}

Semantic roles & 50–950 ramp

primary
#331F7F
secondary
#9CB248
accent
#E444C3
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331F7F

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

Preview Lab → · Contrast checker → · Palette generator →

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