#331F78#331F78

#331F78 is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.7% C 0.142 H 285.8°. Best body text is #FFFFFF at 13.06:1 contrast (WCAG AA passes).

Color values

HEX#331F78
RGBrgb(51, 31, 120)
HSLhsl(253, 59%, 30%)
HSVhsv(253, 74%, 47%)
CMYKcmyk(57.5%, 74.2%, 0%, 52.9%)
CIE-LABlab(20.20, 34.31, -47.50)
CIE-LCHlch(20.20, 58.60, 305.84°)
OKLaboklab(32.71% 0.0387 -0.1367)
OKLCHoklch(32.71% 0.142 285.8)
XYZxyz(5.2444, 3.0396, 18.0760)
Luminance0.0304 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F78 #64781F
analogous
#1F3878 #331F78 #601F78
triadic
#331F78 #78331F #1F7833
tetradic
#331F78 #781F38 #64781F #1F7860
square
#331F78 #781F38 #64781F #1F7860
split-complementary
#331F78 #78601F #38781F
monochromatic
#0A0618 #1E1247 #331F78 #482CA9 #6243CE

Accessibility & contrast

On white

13.06
#331F78 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#331F78 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F78
13.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F78#FFFFFF#000000##FFFFFF
##331F781.0013.061.6113.06
#FFFFFF13.061.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337B
Deuteranopia (green-blind)
#002E76
Tritanopia (blue-blind)
#143749
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331f78;
/* rgb */ color: rgb(51, 31, 120);
/* oklch */ color: oklch(32.7% 0.142 285.8);
Tailwind
colors: {
  custom: {
    50: '#735da0',
    500: '#331f78',
    950: '#000000',
  },
}
SCSS
$custom: #331f78;
$custom-light: #735da0;
$custom-dark: #000000;
JSON
{
  "hex": "#331f78",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 120
  },
  "hsl": {
    "h": 253.483,
    "s": 58.94,
    "l": 29.608
  },
  "oklch": {
    "l": 0.32712,
    "c": 0.14204,
    "h": 285.8
  },
  "luminance": 0.0304
}

Semantic roles & 50–950 ramp

primary
#331F78
secondary
#95AB47
accent
#E246BF
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040F
muted
#7B797E

Preview Lab

Preview with #331F78

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

Preview Lab → · Contrast checker → · Palette generator →

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