#331F54#331F54

#331F54 is a dark, moderate violet. Relative luminance 0.023; OKLCH L 29.5% C 0.093 H 297.9°. Best body text is #FFFFFF at 14.34:1 contrast (WCAG AA passes).

Color values

HEX#331F54
RGBrgb(51, 31, 84)
HSLhsl(263, 46%, 23%)
HSVhsv(263, 63%, 33%)
CMYKcmyk(39.3%, 63.1%, 0%, 67.1%)
CIE-LABlab(17.10, 22.95, -28.91)
CIE-LCHlch(17.10, 36.91, 308.44°)
OKLaboklab(29.51% 0.0434 -0.082)
OKLCHoklch(29.51% 0.093 297.9)
XYZxyz(3.4551, 2.3238, 8.6523)
Luminance0.0232 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F54 #40541F
analogous
#1F2554 #331F54 #4E1F54
triadic
#331F54 #54331F #1F5433
tetradic
#331F54 #541F25 #40541F #1F544E
square
#331F54 #541F25 #40541F #1F544E
split-complementary
#331F54 #544E1F #25541F
monochromatic
#0E0816 #180F27 #331F54 #4E2F81 #6940AD

Accessibility & contrast

On white

14.34
#331F54 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#331F54 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F54
14.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F54#FFFFFF#000000##FFFFFF
##331F541.0014.341.4614.34
#FFFFFF14.341.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#042A56
Deuteranopia (green-blind)
#0C2A53
Tritanopia (blue-blind)
#2B2A36
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #331f54;
/* rgb */ color: rgb(51, 31, 84);
/* oklch */ color: oklch(29.5% 0.093 297.9);
Tailwind
colors: {
  custom: {
    50: '#6d5b84',
    500: '#331f54',
    950: '#000000',
  },
}
SCSS
$custom: #331f54;
$custom-light: #6d5b84;
$custom-dark: #000000;
JSON
{
  "hex": "#331f54",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 84
  },
  "hsl": {
    "h": 262.642,
    "s": 46.087,
    "l": 22.549
  },
  "oklch": {
    "l": 0.29507,
    "c": 0.09279,
    "h": 297.9
  },
  "luminance": 0.02324
}

Semantic roles & 50–950 ramp

primary
#331F54
secondary
#708946
accent
#D652A4
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07040B
muted
#7A797C

Preview Lab

Preview with #331F54

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

Preview Lab → · Contrast checker → · Palette generator →

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