#331F75#331F75

#331F75 is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.4% C 0.138 H 286.6°. Best body text is #FFFFFF at 13.18:1 contrast (WCAG AA passes).

Color values

HEX#331F75
RGBrgb(51, 31, 117)
HSLhsl(254, 58%, 29%)
HSVhsv(254, 74%, 46%)
CMYKcmyk(56.4%, 73.5%, 0%, 54.1%)
CIE-LABlab(19.91, 33.35, -46.05)
CIE-LCHlch(19.91, 56.86, 305.91°)
OKLaboklab(32.42% 0.0394 -0.1324)
OKLCHoklch(32.42% 0.138 286.6)
XYZxyz(5.0652, 2.9679, 17.1321)
Luminance0.0297 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F75 #61751F
analogous
#1F3675 #331F75 #5E1F75
triadic
#331F75 #75331F #1F7533
tetradic
#331F75 #751F36 #61751F #1F755E
square
#331F75 #751F36 #61751F #1F755E
split-complementary
#331F75 #755E1F #36751F
monochromatic
#0B0618 #1E1245 #331F75 #482CA5 #6242CD

Accessibility & contrast

On white

13.18
#331F75 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#331F75 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F75
13.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F75#FFFFFF#000000##FFFFFF
##331F751.0013.181.5913.18
#FFFFFF13.181.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003278
Deuteranopia (green-blind)
#002E73
Tritanopia (blue-blind)
#173647
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331f75;
/* rgb */ color: rgb(51, 31, 117);
/* oklch */ color: oklch(32.4% 0.138 286.6);
Tailwind
colors: {
  custom: {
    50: '#725c9e',
    500: '#331f75',
    950: '#000000',
  },
}
SCSS
$custom: #331f75;
$custom-light: #725c9e;
$custom-dark: #000000;
JSON
{
  "hex": "#331f75",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 117
  },
  "hsl": {
    "h": 253.953,
    "s": 58.108,
    "l": 29.02
  },
  "oklch": {
    "l": 0.32419,
    "c": 0.13813,
    "h": 286.6
  },
  "luminance": 0.02968
}

Semantic roles & 50–950 ramp

primary
#331F75
secondary
#92A947
accent
#E146BD
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040E
muted
#7B797E

Preview Lab

Preview with #331F75

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

Preview Lab → · Contrast checker → · Palette generator →

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