#331D5E#331D5E

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

Color values

HEX#331D5E
RGBrgb(51, 29, 94)
HSLhsl(260, 53%, 24%)
HSVhsv(260, 69%, 37%)
CMYKcmyk(45.7%, 69.1%, 0%, 63.1%)
CIE-LABlab(17.42, 27.30, -35.10)
CIE-LCHlch(17.42, 44.47, 307.87°)
OKLaboklab(29.99% 0.0454 -0.1002)
OKLCHoklch(29.99% 0.11 294.4)
XYZxyz(3.8244, 2.3906, 10.8474)
Luminance0.0239 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D5E #485E1D
analogous
#1D285E #331D5E #541D5E
triadic
#331D5E #5E331D #1D5E33
tetradic
#331D5E #5E1D28 #485E1D #1D5E54
square
#331D5E #5E1D28 #485E1D #1D5E54
split-complementary
#331D5E #5E541D #285E1D
monochromatic
#0D0717 #1A0F2F #331D5E #4C2B8D #663ABC

Accessibility & contrast

On white

14.21
#331D5E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331D5E
14.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D5E#FFFFFF#000000##FFFFFF
##331D5E1.0014.211.4814.21
#FFFFFF14.211.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B60
Deuteranopia (green-blind)
#002A5D
Tritanopia (blue-blind)
#272C3A
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #331d5e;
/* rgb */ color: rgb(51, 29, 94);
/* oklch */ color: oklch(30.0% 0.110 294.4);
Tailwind
colors: {
  custom: {
    50: '#6f5a8c',
    500: '#331d5e',
    950: '#000000',
  },
}
SCSS
$custom: #331d5e;
$custom-light: #6f5a8c;
$custom-dark: #000000;
JSON
{
  "hex": "#331d5e",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 94
  },
  "hsl": {
    "h": 260.308,
    "s": 52.846,
    "l": 24.118
  },
  "oklch": {
    "l": 0.29987,
    "c": 0.11003,
    "h": 294.4
  },
  "luminance": 0.02391
}

Semantic roles & 50–950 ramp

primary
#331D5E
secondary
#789344
accent
#DC4CAB
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#08040C
muted
#7B797D

Preview Lab

Preview with #331D5E

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

Preview Lab → · Contrast checker → · Palette generator →

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