#331F47#331F47

#331F47 is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.5% C 0.074 H 305.3°. Best body text is #FFFFFF at 14.71:1 contrast (WCAG AA passes).

Color values

HEX#331F47
RGBrgb(51, 31, 71)
HSLhsl(270, 39%, 20%)
HSVhsv(270, 56%, 28%)
CMYKcmyk(28.2%, 56.3%, 0%, 72.2%)
CIE-LABlab(16.20, 19.09, -21.49)
CIE-LCHlch(16.20, 28.75, 311.62°)
OKLaboklab(28.55% 0.0427 -0.0603)
OKLCHoklch(28.55% 0.074 305.3)
XYZxyz(2.9923, 2.1387, 6.2152)
Luminance0.0214 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F47 #33471F
analogous
#1F1F47 #331F47 #471F47
triadic
#331F47 #47331F #1F4733
tetradic
#331F47 #471F1F #33471F #1F4747
square
#331F47 #471F1F #33471F #1F4747
split-complementary
#331F47 #47471F #1F471F
monochromatic
#0F0915 #140C1C #331F47 #523272 #70449C

Accessibility & contrast

On white

14.71
#331F47 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#331F47 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F47
14.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F47#FFFFFF#000000##FFFFFF
##331F471.0014.711.4314.71
#FFFFFF14.711.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.711.0021.001.00

Color blindness preview

Protanopia (red-blind)
#132848
Deuteranopia (green-blind)
#192846
Tritanopia (blue-blind)
#30262F
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331f47;
/* rgb */ color: rgb(51, 31, 71);
/* oklch */ color: oklch(28.5% 0.074 305.3);
Tailwind
colors: {
  custom: {
    50: '#6c5b7a',
    500: '#331f47',
    950: '#000000',
  },
}
SCSS
$custom: #331f47;
$custom-light: #6c5b7a;
$custom-dark: #000000;
JSON
{
  "hex": "#331f47",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 71
  },
  "hsl": {
    "h": 270,
    "s": 39.216,
    "l": 20
  },
  "oklch": {
    "l": 0.28549,
    "c": 0.07388,
    "h": 305.3
  },
  "luminance": 0.02139
}

Semantic roles & 50–950 ramp

primary
#331F47
secondary
#617C46
accent
#CF5994
background
#F6F5F7
surface
#EBE9ED
border
#C6C5C8
text
#070409
muted
#7A797B

Preview Lab

Preview with #331F47

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

Preview Lab → · Contrast checker → · Palette generator →

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