#331248#331248

#331248 is a dark, moderate violet. Relative luminance 0.016; OKLCH L 26.4% C 0.098 H 309.3°. Best body text is #FFFFFF at 15.90:1 contrast (WCAG AA passes).

Color values

HEX#331248
RGBrgb(51, 18, 72)
HSLhsl(277, 60%, 18%)
HSVhsv(277, 75%, 28%)
CMYKcmyk(29.2%, 75%, 0%, 71.8%)
CIE-LABlab(13.26, 27.41, -26.89)
CIE-LCHlch(13.26, 38.40, 315.55°)
OKLaboklab(26.42% 0.0622 -0.0761)
OKLCHoklch(26.42% 0.098 309.3)
XYZxyz(2.7510, 1.6043, 6.2944)
Luminance0.0160 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331248 #274812
analogous
#181248 #331248 #481242
triadic
#331248 #483312 #124833
tetradic
#331248 #481812 #274812 #124248
square
#331248 #481812 #274812 #124248
split-complementary
#331248 #424812 #124818
monochromatic
#110618 #110618 #331248 #561E79 #782AAA

Accessibility & contrast

On white

15.90
#331248 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.32
#331248 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331248
15.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331248#FFFFFF#000000##FFFFFF
##3312481.0015.901.3215.90
#FFFFFF15.901.0021.001.00
#0000001.3221.001.0021.00
##FFFFFF15.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00214A
Deuteranopia (green-blind)
#092347
Tritanopia (blue-blind)
#301D2B
Achromatopsia (no color)
#222222

Design tokens & code

CSS
--color: #331248;
/* rgb */ color: rgb(51, 18, 72);
/* oklch */ color: oklch(26.4% 0.098 309.3);
Tailwind
colors: {
  custom: {
    50: '#6d537b',
    500: '#331248',
    950: '#000000',
  },
}
SCSS
$custom: #331248;
$custom-light: #6d537b;
$custom-dark: #000000;
JSON
{
  "hex": "#331248",
  "rgb": {
    "r": 51,
    "g": 18,
    "b": 72
  },
  "hsl": {
    "h": 276.667,
    "s": 60,
    "l": 17.647
  },
  "oklch": {
    "l": 0.26423,
    "c": 0.09822,
    "h": 309.3
  },
  "luminance": 0.01604
}

Semantic roles & 50–950 ramp

primary
#331248
secondary
#528135
accent
#E34582
background
#F6F4F7
surface
#ECE7EE
border
#C7C3C9
text
#070209
muted
#7A787B

Preview Lab

Preview with #331248

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

Preview Lab → · Contrast checker → · Palette generator →

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