#311978#311978

#311978 is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.7% C 0.149 H 285.8°. Best body text is #FFFFFF at 13.63:1 contrast (WCAG AA passes).

Color values

HEX#311978
RGBrgb(49, 25, 120)
HSLhsl(255, 66%, 28%)
HSVhsv(255, 79%, 47%)
CMYKcmyk(59.2%, 79.2%, 0%, 52.9%)
CIE-LABlab(18.82, 37.32, -49.78)
CIE-LCHlch(18.82, 62.22, 306.85°)
OKLaboklab(31.68% 0.0406 -0.1434)
OKLCHoklch(31.68% 0.149 285.8)
XYZxyz(5.0034, 2.7040, 18.0239)
Luminance0.0270 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311978 #607819
analogous
#193078 #311978 #601978
triadic
#311978 #783119 #197831
tetradic
#311978 #781930 #607819 #197860
square
#311978 #781930 #607819 #197860
split-complementary
#311978 #786019 #307819
monochromatic
#0A0519 #1C0E45 #311978 #4624AB #5E36D5

Accessibility & contrast

On white

13.63
#311978 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#311978 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311978
13.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311978#FFFFFF#000000##FFFFFF
##3119781.0013.631.5413.63
#FFFFFF13.631.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307B
Deuteranopia (green-blind)
#002B76
Tritanopia (blue-blind)
#0E3448
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #311978;
/* rgb */ color: rgb(49, 25, 120);
/* oklch */ color: oklch(31.7% 0.149 285.8);
Tailwind
colors: {
  custom: {
    50: '#7259a0',
    500: '#311978',
    950: '#000000',
  },
}
SCSS
$custom: #311978;
$custom-light: #7259a0;
$custom-dark: #000000;
JSON
{
  "hex": "#311978",
  "rgb": {
    "r": 49,
    "g": 25,
    "b": 120
  },
  "hsl": {
    "h": 255.158,
    "s": 65.517,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31684,
    "c": 0.14899,
    "h": 285.8
  },
  "luminance": 0.02704
}

Semantic roles & 50–950 ramp

primary
#311978
secondary
#91AD40
accent
#E83FBE
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040F
muted
#7B797E

Preview Lab

Preview with #311978

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

Preview Lab → · Contrast checker → · Palette generator →

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