#311896#311896

#311896 is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.9% C 0.186 H 279.8°. Best body text is #FFFFFF at 12.34:1 contrast (WCAG AA passes).

Color values

HEX#311896
RGBrgb(49, 24, 150)
HSLhsl(252, 72%, 34%)
HSVhsv(252, 84%, 59%)
CMYKcmyk(67.3%, 84%, 0%, 41.2%)
CIE-LABlab(21.97, 46.87, -63.43)
CIE-LCHlch(21.97, 78.87, 306.46°)
OKLaboklab(34.86% 0.0315 -0.1831)
OKLCHoklch(34.86% 0.186 279.8)
XYZxyz(7.0965, 3.5077, 29.1513)
Luminance0.0351 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311896 #7D9618
analogous
#183E96 #311896 #701896
triadic
#311896 #963118 #189631
tetradic
#311896 #96183E #7D9618 #189670
square
#311896 #96183E #7D9618 #189670
split-complementary
#311896 #967018 #3E9618
monochromatic
#0F072C #201061 #311896 #4220CB #6647E2

Accessibility & contrast

On white

12.34
#311896 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#311896 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311896
12.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311896#FFFFFF#000000##FFFFFF
##3118961.0012.341.7012.34
#FFFFFF12.341.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003999
Deuteranopia (green-blind)
#003094
Tritanopia (blue-blind)
#004059
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #311896;
/* rgb */ color: rgb(49, 24, 150);
/* oklch */ color: oklch(34.9% 0.186 279.8);
Tailwind
colors: {
  custom: {
    50: '#795ab6',
    500: '#311896',
    950: '#000000',
  },
}
SCSS
$custom: #311896;
$custom-light: #795ab6;
$custom-dark: #000000;
JSON
{
  "hex": "#311896",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 150
  },
  "hsl": {
    "h": 251.905,
    "s": 72.414,
    "l": 34.118
  },
  "oklch": {
    "l": 0.34859,
    "c": 0.18582,
    "h": 279.8
  },
  "luminance": 0.03508
}

Semantic roles & 50–950 ramp

primary
#311896
secondary
#AAC347
accent
#EF39CB
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #311896

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

Preview Lab → · Contrast checker → · Palette generator →

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