#331F73#331F73

#331F73 is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.2% C 0.136 H 287.1°. Best body text is #FFFFFF at 13.25:1 contrast (WCAG AA passes).

Color values

HEX#331F73
RGBrgb(51, 31, 115)
HSLhsl(254, 58%, 29%)
HSVhsv(254, 73%, 45%)
CMYKcmyk(55.7%, 73%, 0%, 54.9%)
CIE-LABlab(19.73, 32.71, -45.07)
CIE-LCHlch(19.73, 55.69, 305.97°)
OKLaboklab(32.23% 0.0398 -0.1295)
OKLCHoklch(32.23% 0.136 287.1)
XYZxyz(4.9488, 2.9213, 16.5194)
Luminance0.0292 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F73 #5F731F
analogous
#1F3573 #331F73 #5D1F73
triadic
#331F73 #73331F #1F7333
tetradic
#331F73 #731F35 #5F731F #1F735D
square
#331F73 #731F35 #5F731F #1F735D
split-complementary
#331F73 #735D1F #35731F
monochromatic
#0B0618 #1E1243 #331F73 #482CA3 #6241CC

Accessibility & contrast

On white

13.25
#331F73 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#331F73 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F73
13.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F73#FFFFFF#000000##FFFFFF
##331F731.0013.251.5813.25
#FFFFFF13.251.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003276
Deuteranopia (green-blind)
#002D71
Tritanopia (blue-blind)
#193546
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331f73;
/* rgb */ color: rgb(51, 31, 115);
/* oklch */ color: oklch(32.2% 0.136 287.1);
Tailwind
colors: {
  custom: {
    50: '#725c9c',
    500: '#331f73',
    950: '#000000',
  },
}
SCSS
$custom: #331f73;
$custom-light: #725c9c;
$custom-dark: #000000;
JSON
{
  "hex": "#331f73",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 115
  },
  "hsl": {
    "h": 254.286,
    "s": 57.534,
    "l": 28.627
  },
  "oklch": {
    "l": 0.32227,
    "c": 0.1355,
    "h": 287.1
  },
  "luminance": 0.02922
}

Semantic roles & 50–950 ramp

primary
#331F73
secondary
#90A747
accent
#E147BC
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #331F73

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

Preview Lab → · Contrast checker → · Palette generator →

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