#331F55#331F55

#331F55 is a dark, moderate violet. Relative luminance 0.023; OKLCH L 29.6% C 0.094 H 297.4°. Best body text is #FFFFFF at 14.31:1 contrast (WCAG AA passes).

Color values

HEX#331F55
RGBrgb(51, 31, 85)
HSLhsl(262, 47%, 23%)
HSVhsv(262, 64%, 33%)
CMYKcmyk(40%, 63.5%, 0%, 66.7%)
CIE-LABlab(17.18, 23.25, -29.47)
CIE-LCHlch(17.18, 37.54, 308.28°)
OKLaboklab(29.59% 0.0434 -0.0837)
OKLCHoklch(29.59% 0.094 297.4)
XYZxyz(3.4945, 2.3396, 8.8600)
Luminance0.0234 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F55 #41551F
analogous
#1F2655 #331F55 #4E1F55
triadic
#331F55 #55331F #1F5533
tetradic
#331F55 #551F26 #41551F #1F554E
square
#331F55 #551F26 #41551F #1F554E
split-complementary
#331F55 #554E1F #26551F
monochromatic
#0D0816 #180F28 #331F55 #4E2F82 #6940AF

Accessibility & contrast

On white

14.31
#331F55 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#331F55 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F55
14.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F55#FFFFFF#000000##FFFFFF
##331F551.0014.311.4714.31
#FFFFFF14.311.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#032A57
Deuteranopia (green-blind)
#0B2A54
Tritanopia (blue-blind)
#2B2A36
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #331f55;
/* rgb */ color: rgb(51, 31, 85);
/* oklch */ color: oklch(29.6% 0.094 297.4);
Tailwind
colors: {
  custom: {
    50: '#6d5b85',
    500: '#331f55',
    950: '#000000',
  },
}
SCSS
$custom: #331f55;
$custom-light: #6d5b85;
$custom-dark: #000000;
JSON
{
  "hex": "#331f55",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 85
  },
  "hsl": {
    "h": 262.222,
    "s": 46.552,
    "l": 22.745
  },
  "oklch": {
    "l": 0.29586,
    "c": 0.09423,
    "h": 297.4
  },
  "luminance": 0.0234
}

Semantic roles & 50–950 ramp

primary
#331F55
secondary
#718A46
accent
#D652A5
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07040B
muted
#7A797C

Preview Lab

Preview with #331F55

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

Preview Lab → · Contrast checker → · Palette generator →

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