#311C8C#311C8C

#311C8C is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.2% C 0.171 H 281.0°. Best body text is #FFFFFF at 12.53:1 contrast (WCAG AA passes).

Color values

HEX#311C8C
RGBrgb(49, 28, 140)
HSLhsl(251, 67%, 33%)
HSVhsv(251, 80%, 55%)
CMYKcmyk(65%, 80%, 0%, 45.1%)
CIE-LABlab(21.49, 41.96, -58.02)
CIE-LCHlch(21.49, 71.60, 305.87°)
OKLaboklab(34.19% 0.0326 -0.1674)
OKLCHoklch(34.19% 0.171 281)
XYZxyz(6.4140, 3.3764, 25.1196)
Luminance0.0338 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311C8C #778C1C
analogous
#1C3F8C #311C8C #691C8C
triadic
#311C8C #8C311C #1C8C31
tetradic
#311C8C #8C1C3F #778C1C #1C8C69
square
#311C8C #8C1C3F #778C1C #1C8C69
split-complementary
#311C8C #8C691C #3F8C1C
monochromatic
#0D0826 #1F1259 #311C8C #4326BF #6348DA

Accessibility & contrast

On white

12.53
#311C8C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#311C8C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311C8C
12.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311C8C#FFFFFF#000000##FFFFFF
##311C8C1.0012.531.6812.53
#FFFFFF12.531.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00378F
Deuteranopia (green-blind)
#002F8A
Tritanopia (blue-blind)
#003D54
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #311c8c;
/* rgb */ color: rgb(49, 28, 140);
/* oklch */ color: oklch(34.2% 0.171 281.0);
Tailwind
colors: {
  custom: {
    50: '#765caf',
    500: '#311c8c',
    950: '#000000',
  },
}
SCSS
$custom: #311c8c;
$custom-light: #765caf;
$custom-dark: #000000;
JSON
{
  "hex": "#311c8c",
  "rgb": {
    "r": 49,
    "g": 28,
    "b": 140
  },
  "hsl": {
    "h": 251.25,
    "s": 66.667,
    "l": 32.941
  },
  "oklch": {
    "l": 0.34194,
    "c": 0.17058,
    "h": 281
  },
  "luminance": 0.03377
}

Semantic roles & 50–950 ramp

primary
#311C8C
secondary
#A6BC48
accent
#EA3EC9
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #311C8C

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

Preview Lab → · Contrast checker → · Palette generator →

#311C8C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva