#331F5E#331F5E

#331F5E is a dark, moderate violet. Relative luminance 0.025; OKLCH L 30.3% C 0.107 H 293.6°. Best body text is #FFFFFF at 14.01:1 contrast (WCAG AA passes).

Color values

HEX#331F5E
RGBrgb(51, 31, 94)
HSLhsl(259, 50%, 25%)
HSVhsv(259, 67%, 37%)
CMYKcmyk(45.7%, 67%, 0%, 63.1%)
CIE-LABlab(17.88, 26.05, -34.35)
CIE-LCHlch(17.88, 43.11, 307.18°)
OKLaboklab(30.32% 0.0429 -0.098)
OKLCHoklch(30.32% 0.107 293.6)
XYZxyz(3.8751, 2.4918, 10.8643)
Luminance0.0249 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F5E #4A5E1F
analogous
#1F2A5E #331F5E #531F5E
triadic
#331F5E #5E331F #1F5E33
tetradic
#331F5E #5E1F2A #4A5E1F #1F5E53
square
#331F5E #5E1F2A #4A5E1F #1F5E53
split-complementary
#331F5E #5E531F #2A5E1F
monochromatic
#0C0817 #1A1030 #331F5E #4C2E8C #653DBA

Accessibility & contrast

On white

14.01
#331F5E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.50
#331F5E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F5E
14.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F5E#FFFFFF#000000##FFFFFF
##331F5E1.0014.011.5014.01
#FFFFFF14.011.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF14.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C60
Deuteranopia (green-blind)
#002B5D
Tritanopia (blue-blind)
#272D3B
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #331f5e;
/* rgb */ color: rgb(51, 31, 94);
/* oklch */ color: oklch(30.3% 0.107 293.6);
Tailwind
colors: {
  custom: {
    50: '#6f5c8c',
    500: '#331f5e',
    950: '#000000',
  },
}
SCSS
$custom: #331f5e;
$custom-light: #6f5c8c;
$custom-dark: #000000;
JSON
{
  "hex": "#331f5e",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 94
  },
  "hsl": {
    "h": 259.048,
    "s": 50.4,
    "l": 24.51
  },
  "oklch": {
    "l": 0.30324,
    "c": 0.10699,
    "h": 293.6
  },
  "luminance": 0.02492
}

Semantic roles & 50–950 ramp

primary
#331F5E
secondary
#7A9346
accent
#DA4EAD
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07040C
muted
#7A797D

Preview Lab

Preview with #331F5E

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

Preview Lab → · Contrast checker → · Palette generator →

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