#311895#311895

#311895 is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.7% C 0.185 H 279.9°. Best body text is #FFFFFF at 12.39:1 contrast (WCAG AA passes).

Color values

HEX#311895
RGBrgb(49, 24, 149)
HSLhsl(252, 72%, 34%)
HSVhsv(252, 84%, 58%)
CMYKcmyk(67.1%, 83.9%, 0%, 41.6%)
CIE-LABlab(21.86, 46.57, -63.01)
CIE-LCHlch(21.86, 78.35, 306.47°)
OKLaboklab(34.74% 0.0319 -0.1819)
OKLCHoklch(34.74% 0.185 279.9)
XYZxyz(7.0163, 3.4756, 28.7291)
Luminance0.0348 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311895 #7C9518
analogous
#183E95 #311895 #701895
triadic
#311895 #953118 #189531
tetradic
#311895 #95183E #7C9518 #189570
square
#311895 #95183E #7C9518 #189570
split-complementary
#311895 #957018 #3E9518
monochromatic
#0E072C #201060 #311895 #4220CA #6546E1

Accessibility & contrast

On white

12.39
#311895 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311895
12.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311895#FFFFFF#000000##FFFFFF
##3118951.0012.391.7012.39
#FFFFFF12.391.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003998
Deuteranopia (green-blind)
#003093
Tritanopia (blue-blind)
#003F58
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #311895;
/* rgb */ color: rgb(49, 24, 149);
/* oklch */ color: oklch(34.7% 0.185 279.9);
Tailwind
colors: {
  custom: {
    50: '#785ab5',
    500: '#311895',
    950: '#000000',
  },
}
SCSS
$custom: #311895;
$custom-light: #785ab5;
$custom-dark: #000000;
JSON
{
  "hex": "#311895",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 149
  },
  "hsl": {
    "h": 252,
    "s": 72.254,
    "l": 33.922
  },
  "oklch": {
    "l": 0.34745,
    "c": 0.18467,
    "h": 279.9
  },
  "luminance": 0.03476
}

Semantic roles & 50–950 ramp

primary
#311895
secondary
#AAC246
accent
#EF39CB
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #311895

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

Preview Lab → · Contrast checker → · Palette generator →

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