#331F56#331F56

#331F56 is a dark, moderate violet. Relative luminance 0.024; OKLCH L 29.7% C 0.096 H 296.9°. Best body text is #FFFFFF at 14.27:1 contrast (WCAG AA passes).

Color values

HEX#331F56
RGBrgb(51, 31, 86)
HSLhsl(262, 47%, 23%)
HSVhsv(262, 64%, 34%)
CMYKcmyk(40.7%, 64%, 0%, 66.3%)
CIE-LABlab(17.25, 23.56, -30.02)
CIE-LCHlch(17.25, 38.16, 308.13°)
OKLaboklab(29.67% 0.0433 -0.0853)
OKLCHoklch(29.67% 0.096 296.9)
XYZxyz(3.5345, 2.3556, 9.0708)
Luminance0.0236 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F56 #42561F
analogous
#1F2656 #331F56 #4E1F56
triadic
#331F56 #56331F #1F5633
tetradic
#331F56 #561F26 #42561F #1F564E
square
#331F56 #561F26 #42561F #1F564E
split-complementary
#331F56 #564E1F #26561F
monochromatic
#0D0816 #180F29 #331F56 #4E2F83 #683FB0

Accessibility & contrast

On white

14.27
#331F56 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331F56
14.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F56#FFFFFF#000000##FFFFFF
##331F561.0014.271.4714.27
#FFFFFF14.271.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#012B58
Deuteranopia (green-blind)
#092A55
Tritanopia (blue-blind)
#2B2B37
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #331f56;
/* rgb */ color: rgb(51, 31, 86);
/* oklch */ color: oklch(29.7% 0.096 296.9);
Tailwind
colors: {
  custom: {
    50: '#6e5b86',
    500: '#331f56',
    950: '#000000',
  },
}
SCSS
$custom: #331f56;
$custom-light: #6e5b86;
$custom-dark: #000000;
JSON
{
  "hex": "#331f56",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 86
  },
  "hsl": {
    "h": 261.818,
    "s": 47.009,
    "l": 22.941
  },
  "oklch": {
    "l": 0.29665,
    "c": 0.09566,
    "h": 296.9
  },
  "luminance": 0.02356
}

Semantic roles & 50–950 ramp

primary
#331F56
secondary
#728B46
accent
#D751A6
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07040B
muted
#7A797C

Preview Lab

Preview with #331F56

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

Preview Lab → · Contrast checker → · Palette generator →

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