#311778#311778

#311778 is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.4% C 0.151 H 286.2°. Best body text is #FFFFFF at 13.78:1 contrast (WCAG AA passes).

Color values

HEX#311778
RGBrgb(49, 23, 120)
HSLhsl(256, 68%, 28%)
HSVhsv(256, 81%, 47%)
CMYKcmyk(59.2%, 80.8%, 0%, 52.9%)
CIE-LABlab(18.46, 38.34, -50.37)
CIE-LCHlch(18.46, 63.31, 307.28°)
OKLaboklab(31.43% 0.042 -0.1451)
OKLCHoklch(31.43% 0.151 286.2)
XYZxyz(4.9622, 2.6215, 18.0102)
Luminance0.0262 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311778 #5E7817
analogous
#172E78 #311778 #611778
triadic
#311778 #783117 #177831
tetradic
#311778 #78172E #5E7817 #177861
square
#311778 #78172E #5E7817 #177861
split-complementary
#311778 #786117 #2E7817
monochromatic
#0A051A #1C0D45 #311778 #4621AB #5E32D8

Accessibility & contrast

On white

13.78
#311778 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#311778 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311778
13.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311778#FFFFFF#000000##FFFFFF
##3117781.0013.781.5213.78
#FFFFFF13.781.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7B
Deuteranopia (green-blind)
#002A76
Tritanopia (blue-blind)
#0E3347
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #311778;
/* rgb */ color: rgb(49, 23, 120);
/* oklch */ color: oklch(31.4% 0.151 286.2);
Tailwind
colors: {
  custom: {
    50: '#7358a0',
    500: '#311778',
    950: '#000000',
  },
}
SCSS
$custom: #311778;
$custom-light: #7358a0;
$custom-dark: #000000;
JSON
{
  "hex": "#311778",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 120
  },
  "hsl": {
    "h": 256.082,
    "s": 67.832,
    "l": 28.039
  },
  "oklch": {
    "l": 0.31434,
    "c": 0.15103,
    "h": 286.2
  },
  "luminance": 0.02622
}

Semantic roles & 50–950 ramp

primary
#311778
secondary
#8FAD3E
accent
#EB3DBC
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#09030F
muted
#7B787F

Preview Lab

Preview with #311778

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

Preview Lab → · Contrast checker → · Palette generator →

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