#331F7A#331F7A

#331F7A is a dark, vivid violet. Relative luminance 0.031; OKLCH L 32.9% C 0.145 H 285.4°. Best body text is #FFFFFF at 12.98:1 contrast (WCAG AA passes).

Color values

HEX#331F7A
RGBrgb(51, 31, 122)
HSLhsl(253, 59%, 30%)
HSVhsv(253, 75%, 48%)
CMYKcmyk(58.2%, 74.6%, 0%, 52.2%)
CIE-LABlab(20.40, 34.95, -48.46)
CIE-LCHlch(20.40, 59.75, 305.80°)
OKLaboklab(32.91% 0.0383 -0.1395)
OKLCHoklch(32.91% 0.145 285.4)
XYZxyz(5.3670, 3.0886, 18.7219)
Luminance0.0309 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F7A #667A1F
analogous
#1F387A #331F7A #611F7A
triadic
#331F7A #7A331F #1F7A33
tetradic
#331F7A #7A1F38 #667A1F #1F7A61
square
#331F7A #7A1F38 #667A1F #1F7A61
split-complementary
#331F7A #7A611F #387A1F
monochromatic
#0A0618 #1F1349 #331F7A #472BAB #6344CF

Accessibility & contrast

On white

12.98
#331F7A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#331F7A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F7A
12.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F7A#FFFFFF#000000##FFFFFF
##331F7A1.0012.981.6212.98
#FFFFFF12.981.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00347D
Deuteranopia (green-blind)
#002E78
Tritanopia (blue-blind)
#11384A
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331f7a;
/* rgb */ color: rgb(51, 31, 122);
/* oklch */ color: oklch(32.9% 0.145 285.4);
Tailwind
colors: {
  custom: {
    50: '#735da1',
    500: '#331f7a',
    950: '#000000',
  },
}
SCSS
$custom: #331f7a;
$custom-light: #735da1;
$custom-dark: #000000;
JSON
{
  "hex": "#331f7a",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 122
  },
  "hsl": {
    "h": 253.187,
    "s": 59.477,
    "l": 30
  },
  "oklch": {
    "l": 0.32909,
    "c": 0.14463,
    "h": 285.4
  },
  "luminance": 0.03089
}

Semantic roles & 50–950 ramp

primary
#331F7A
secondary
#97AD47
accent
#E345C0
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331F7A

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

Preview Lab → · Contrast checker → · Palette generator →

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