#331F7C#331F7C

#331F7C is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.1% C 0.147 H 284.9°. Best body text is #FFFFFF at 12.90:1 contrast (WCAG AA passes).

Color values

HEX#331F7C
RGBrgb(51, 31, 124)
HSLhsl(253, 60%, 30%)
HSVhsv(253, 75%, 49%)
CMYKcmyk(58.9%, 75%, 0%, 51.4%)
CIE-LABlab(20.59, 35.58, -49.42)
CIE-LCHlch(20.59, 60.90, 305.76°)
OKLaboklab(33.11% 0.0378 -0.1423)
OKLCHoklch(33.11% 0.147 284.9)
XYZxyz(5.4922, 3.1387, 19.3813)
Luminance0.0314 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F7C #687C1F
analogous
#1F3A7C #331F7C #611F7C
triadic
#331F7C #7C331F #1F7C33
tetradic
#331F7C #7C1F3A #687C1F #1F7C61
square
#331F7C #7C1F3A #687C1F #1F7C61
split-complementary
#331F7C #7C611F #3A7C1F
monochromatic
#0B071A #1F134B #331F7C #472BAD #6345D0

Accessibility & contrast

On white

12.90
#331F7C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#331F7C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F7C
12.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F7C#FFFFFF#000000##FFFFFF
##331F7C1.0012.901.6312.90
#FFFFFF12.901.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00347F
Deuteranopia (green-blind)
#002F7A
Tritanopia (blue-blind)
#0E384B
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #331f7c;
/* rgb */ color: rgb(51, 31, 124);
/* oklch */ color: oklch(33.1% 0.147 284.9);
Tailwind
colors: {
  custom: {
    50: '#745da3',
    500: '#331f7c',
    950: '#000000',
  },
}
SCSS
$custom: #331f7c;
$custom-light: #745da3;
$custom-dark: #000000;
JSON
{
  "hex": "#331f7c",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 124
  },
  "hsl": {
    "h": 252.903,
    "s": 60,
    "l": 30.392
  },
  "oklch": {
    "l": 0.33107,
    "c": 0.1472,
    "h": 284.9
  },
  "luminance": 0.03139
}

Semantic roles & 50–950 ramp

primary
#331F7C
secondary
#99AF48
accent
#E345C1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331F7C

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

Preview Lab → · Contrast checker → · Palette generator →

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