#311252#311252

#311252 is a dark, moderate violet. Relative luminance 0.017; OKLCH L 27.0% C 0.110 H 301.4°. Best body text is #FFFFFF at 15.68:1 contrast (WCAG AA passes).

Color values

HEX#311252
RGBrgb(49, 18, 82)
HSLhsl(269, 64%, 20%)
HSVhsv(269, 78%, 32%)
CMYKcmyk(40.2%, 78%, 0%, 67.8%)
CIE-LABlab(13.80, 29.68, -32.91)
CIE-LCHlch(13.80, 44.32, 312.04°)
OKLaboklab(27.01% 0.0573 -0.0938)
OKLCHoklch(27.01% 0.11 301.4)
XYZxyz(3.0056, 1.6948, 8.1498)
Luminance0.0169 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311252 #335212
analogous
#121352 #311252 #511252
triadic
#311252 #523112 #125231
tetradic
#311252 #521213 #335212 #125251
square
#311252 #521213 #335212 #125251
split-complementary
#311252 #525112 #135212
monochromatic
#0F0619 #130720 #311252 #4F1D84 #6D28B6

Accessibility & contrast

On white

15.68
#311252 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.34
#311252 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311252
15.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311252#FFFFFF#000000##FFFFFF
##3112521.0015.681.3415.68
#FFFFFF15.681.0021.001.00
#0000001.3421.001.0021.00
##FFFFFF15.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002354
Deuteranopia (green-blind)
#002351
Tritanopia (blue-blind)
#2A2230
Achromatopsia (no color)
#232323

Design tokens & code

CSS
--color: #311252;
/* rgb */ color: rgb(49, 18, 82);
/* oklch */ color: oklch(27.0% 0.110 301.4);
Tailwind
colors: {
  custom: {
    50: '#6d5383',
    500: '#311252',
    950: '#000000',
  },
}
SCSS
$custom: #311252;
$custom-light: #6d5383;
$custom-dark: #000000;
JSON
{
  "hex": "#311252",
  "rgb": {
    "r": 49,
    "g": 18,
    "b": 82
  },
  "hsl": {
    "h": 269.063,
    "s": 64,
    "l": 19.608
  },
  "oklch": {
    "l": 0.27008,
    "c": 0.10995,
    "h": 301.4
  },
  "luminance": 0.01695
}

Semantic roles & 50–950 ramp

primary
#311252
secondary
#618B35
accent
#E74196
background
#F6F4F8
surface
#ECE7EF
border
#C7C3CA
text
#07020B
muted
#7A787C

Preview Lab

Preview with #311252

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

Preview Lab → · Contrast checker → · Palette generator →

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