#331257#331257

#331257 is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.7% C 0.116 H 300.7°. Best body text is #FFFFFF at 15.38:1 contrast (WCAG AA passes).

Color values

HEX#331257
RGBrgb(51, 18, 87)
HSLhsl(269, 66%, 21%)
HSVhsv(269, 79%, 34%)
CMYKcmyk(41.4%, 79.3%, 0%, 65.9%)
CIE-LABlab(14.54, 31.51, -35.09)
CIE-LCHlch(14.54, 47.16, 311.92°)
OKLaboklab(27.74% 0.0595 -0.1001)
OKLCHoklch(27.74% 0.116 300.7)
XYZxyz(3.3014, 1.8245, 9.1932)
Luminance0.0182 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331257 #365712
analogous
#121357 #331257 #551257
triadic
#331257 #573312 #125733
tetradic
#331257 #571213 #365712 #125755
square
#331257 #571213 #365712 #125755
split-complementary
#331257 #575512 #135712
monochromatic
#0F0519 #150824 #331257 #511C8A #6E27BC

Accessibility & contrast

On white

15.38
#331257 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.37
#331257 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331257
15.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331257#FFFFFF#000000##FFFFFF
##3312571.0015.381.3715.38
#FFFFFF15.381.0021.001.00
#0000001.3721.001.0021.00
##FFFFFF15.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002459
Deuteranopia (green-blind)
#002456
Tritanopia (blue-blind)
#2B2333
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #331257;
/* rgb */ color: rgb(51, 18, 87);
/* oklch */ color: oklch(27.7% 0.116 300.7);
Tailwind
colors: {
  custom: {
    50: '#6f5387',
    500: '#331257',
    950: '#000000',
  },
}
SCSS
$custom: #331257;
$custom-light: #6f5387;
$custom-dark: #000000;
JSON
{
  "hex": "#331257",
  "rgb": {
    "r": 51,
    "g": 18,
    "b": 87
  },
  "hsl": {
    "h": 268.696,
    "s": 65.714,
    "l": 20.588
  },
  "oklch": {
    "l": 0.27738,
    "c": 0.11646,
    "h": 300.7
  },
  "luminance": 0.01825
}

Semantic roles & 50–950 ramp

primary
#331257
secondary
#649035
accent
#E93F98
background
#F6F4F8
surface
#ECE7EF
border
#C7C3CA
text
#08030B
muted
#7B787C

Preview Lab

Preview with #331257

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

Preview Lab → · Contrast checker → · Palette generator →

#331257 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva