#331852#331852

#331852 is a dark, moderate violet. Relative luminance 0.020; OKLCH L 28.2% C 0.102 H 301.6°. Best body text is #FFFFFF at 15.07:1 contrast (WCAG AA passes).

Color values

HEX#331852
RGBrgb(51, 24, 82)
HSLhsl(268, 55%, 21%)
HSVhsv(268, 71%, 32%)
CMYKcmyk(37.8%, 70.7%, 0%, 67.8%)
CIE-LABlab(15.31, 26.74, -30.45)
CIE-LCHlch(15.31, 40.52, 311.29°)
OKLaboklab(28.15% 0.0531 -0.0865)
OKLCHoklch(28.15% 0.102 301.6)
XYZxyz(3.2145, 1.9663, 8.1912)
Luminance0.0197 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331852 #375218
analogous
#181A52 #331852 #501852
triadic
#331852 #523318 #185233
tetradic
#331852 #52181A #375218 #185250
square
#331852 #52181A #375218 #185250
split-complementary
#331852 #525018 #1A5218
monochromatic
#0F0718 #160A23 #331852 #502681 #6E34B1

Accessibility & contrast

On white

15.07
#331852 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.39
#331852 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331852
15.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331852#FFFFFF#000000##FFFFFF
##3318521.0015.071.3915.07
#FFFFFF15.071.0021.001.00
#0000001.3921.001.0021.00
##FFFFFF15.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002654
Deuteranopia (green-blind)
#032651
Tritanopia (blue-blind)
#2D2532
Achromatopsia (no color)
#262626

Design tokens & code

CSS
--color: #331852;
/* rgb */ color: rgb(51, 24, 82);
/* oklch */ color: oklch(28.2% 0.102 301.6);
Tailwind
colors: {
  custom: {
    50: '#6e5783',
    500: '#331852',
    950: '#000000',
  },
}
SCSS
$custom: #331852;
$custom-light: #6e5783;
$custom-dark: #000000;
JSON
{
  "hex": "#331852",
  "rgb": {
    "r": 51,
    "g": 24,
    "b": 82
  },
  "hsl": {
    "h": 267.931,
    "s": 54.717,
    "l": 20.784
  },
  "oklch": {
    "l": 0.28153,
    "c": 0.10154,
    "h": 301.6
  },
  "luminance": 0.01966
}

Semantic roles & 50–950 ramp

primary
#331852
secondary
#66893D
accent
#DE4A99
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07030A
muted
#7A787C

Preview Lab

Preview with #331852

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

Preview Lab → · Contrast checker → · Palette generator →

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