#331F5A#331F5A

#331F5A is a dark, moderate violet. Relative luminance 0.024; OKLCH L 30.0% C 0.101 H 295.2°. Best body text is #FFFFFF at 14.15:1 contrast (WCAG AA passes).

Color values

HEX#331F5A
RGBrgb(51, 31, 90)
HSLhsl(260, 49%, 24%)
HSVhsv(260, 66%, 35%)
CMYKcmyk(43.3%, 65.6%, 0%, 64.7%)
CIE-LABlab(17.56, 24.80, -32.20)
CIE-LCHlch(17.56, 40.64, 307.60°)
OKLaboklab(29.99% 0.0432 -0.0917)
OKLCHoklch(29.99% 0.101 295.2)
XYZxyz(3.7002, 2.4219, 9.9434)
Luminance0.0242 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F5A #465A1F
analogous
#1F285A #331F5A #501F5A
triadic
#331F5A #5A331F #1F5A33
tetradic
#331F5A #5A1F28 #465A1F #1F5A50
square
#331F5A #5A1F28 #465A1F #1F5A50
split-complementary
#331F5A #5A501F #285A1F
monochromatic
#0D0817 #190F2C #331F5A #4D2F88 #673EB5

Accessibility & contrast

On white

14.15
#331F5A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.48
#331F5A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F5A
14.15:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F5A#FFFFFF#000000##FFFFFF
##331F5A1.0014.151.4814.15
#FFFFFF14.151.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.151.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C5C
Deuteranopia (green-blind)
#022A59
Tritanopia (blue-blind)
#292C39
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #331f5a;
/* rgb */ color: rgb(51, 31, 90);
/* oklch */ color: oklch(30.0% 0.101 295.2);
Tailwind
colors: {
  custom: {
    50: '#6e5b89',
    500: '#331f5a',
    950: '#000000',
  },
}
SCSS
$custom: #331f5a;
$custom-light: #6e5b89;
$custom-dark: #000000;
JSON
{
  "hex": "#331f5a",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 90
  },
  "hsl": {
    "h": 260.339,
    "s": 48.76,
    "l": 23.725
  },
  "oklch": {
    "l": 0.29989,
    "c": 0.10136,
    "h": 295.2
  },
  "luminance": 0.02422
}

Semantic roles & 50–950 ramp

primary
#331F5A
secondary
#768F46
accent
#D84FAA
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07040B
muted
#7A797C

Preview Lab

Preview with #331F5A

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

Preview Lab → · Contrast checker → · Palette generator →

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