#331D63#331D63

#331D63 is a dark, moderate violet. Relative luminance 0.025; OKLCH L 30.4% C 0.117 H 292.5°. Best body text is #FFFFFF at 14.03:1 contrast (WCAG AA passes).

Color values

HEX#331D63
RGBrgb(51, 29, 99)
HSLhsl(259, 55%, 25%)
HSVhsv(259, 71%, 39%)
CMYKcmyk(48.5%, 70.7%, 0%, 61.2%)
CIE-LABlab(17.84, 28.85, -37.72)
CIE-LCHlch(17.84, 47.49, 307.41°)
OKLaboklab(30.43% 0.0447 -0.1079)
OKLCHoklch(30.43% 0.117 292.5)
XYZxyz(4.0561, 2.4833, 12.0676)
Luminance0.0248 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D63 #4D631D
analogous
#1D2A63 #331D63 #561D63
triadic
#331D63 #63331D #1D6333
tetradic
#331D63 #631D2A #4D631D #1D6356
square
#331D63 #631D2A #4D631D #1D6356
split-complementary
#331D63 #63561D #2A631D
monochromatic
#0C0718 #1B0F34 #331D63 #4B2B92 #6439C2

Accessibility & contrast

On white

14.03
#331D63 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331D63
14.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D63#FFFFFF#000000##FFFFFF
##331D631.0014.031.5014.03
#FFFFFF14.031.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF14.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D65
Deuteranopia (green-blind)
#002A62
Tritanopia (blue-blind)
#252E3D
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #331d63;
/* rgb */ color: rgb(51, 29, 99);
/* oklch */ color: oklch(30.4% 0.117 292.5);
Tailwind
colors: {
  custom: {
    50: '#705a90',
    500: '#331d63',
    950: '#000000',
  },
}
SCSS
$custom: #331d63;
$custom-light: #705a90;
$custom-dark: #000000;
JSON
{
  "hex": "#331d63",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 99
  },
  "hsl": {
    "h": 258.857,
    "s": 54.688,
    "l": 25.098
  },
  "oklch": {
    "l": 0.30428,
    "c": 0.11684,
    "h": 292.5
  },
  "luminance": 0.02483
}

Semantic roles & 50–950 ramp

primary
#331D63
secondary
#7E9844
accent
#DE4AAF
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#08040C
muted
#7B797D

Preview Lab

Preview with #331D63

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

Preview Lab → · Contrast checker → · Palette generator →

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