#331F45#331F45

#331F45 is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.4% C 0.071 H 306.7°. Best body text is #FFFFFF at 14.76:1 contrast (WCAG AA passes).

Color values

HEX#331F45
RGBrgb(51, 31, 69)
HSLhsl(272, 38%, 20%)
HSVhsv(272, 55%, 27%)
CMYKcmyk(26.1%, 55.1%, 0%, 72.9%)
CIE-LABlab(16.07, 18.52, -20.31)
CIE-LCHlch(16.07, 27.49, 312.36°)
OKLaboklab(28.41% 0.0424 -0.0569)
OKLCHoklch(28.41% 0.071 306.7)
XYZxyz(2.9292, 2.1135, 5.8827)
Luminance0.0211 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F45 #31451F
analogous
#201F45 #331F45 #451F44
triadic
#331F45 #45331F #1F4533
tetradic
#331F45 #45201F #31451F #1F4445
square
#331F45 #45201F #31451F #1F4445
split-complementary
#331F45 #44451F #1F4520
monochromatic
#100915 #140C1B #331F45 #52326F #714599

Accessibility & contrast

On white

14.76
#331F45 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#331F45 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F45
14.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F45#FFFFFF#000000##FFFFFF
##331F451.0014.761.4214.76
#FFFFFF14.761.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#152746
Deuteranopia (green-blind)
#1A2844
Tritanopia (blue-blind)
#30262E
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331f45;
/* rgb */ color: rgb(51, 31, 69);
/* oklch */ color: oklch(28.4% 0.071 306.7);
Tailwind
colors: {
  custom: {
    50: '#6c5b79',
    500: '#331f45',
    950: '#000000',
  },
}
SCSS
$custom: #331f45;
$custom-light: #6c5b79;
$custom-dark: #000000;
JSON
{
  "hex": "#331f45",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 69
  },
  "hsl": {
    "h": 271.579,
    "s": 38,
    "l": 19.608
  },
  "oklch": {
    "l": 0.28413,
    "c": 0.07095,
    "h": 306.7
  },
  "luminance": 0.02113
}

Semantic roles & 50–950 ramp

primary
#331F45
secondary
#5F7946
accent
#CE5A91
background
#F6F5F7
surface
#EBE9ED
border
#C6C5C8
text
#070409
muted
#7A797B

Preview Lab

Preview with #331F45

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

Preview Lab → · Contrast checker → · Palette generator →

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