#311878#311878

#311878 is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.6% C 0.150 H 286.0°. Best body text is #FFFFFF at 13.70:1 contrast (WCAG AA passes).

Color values

HEX#311878
RGBrgb(49, 24, 120)
HSLhsl(256, 67%, 28%)
HSVhsv(256, 80%, 47%)
CMYKcmyk(59.2%, 80%, 0%, 52.9%)
CIE-LABlab(18.64, 37.83, -50.08)
CIE-LCHlch(18.64, 62.77, 307.07°)
OKLaboklab(31.56% 0.0413 -0.1442)
OKLCHoklch(31.56% 0.15 286)
XYZxyz(4.9824, 2.6620, 18.0169)
Luminance0.0266 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311878 #5F7818
analogous
#182F78 #311878 #611878
triadic
#311878 #783118 #187831
tetradic
#311878 #78182F #5F7818 #187861
square
#311878 #78182F #5F7818 #187861
split-complementary
#311878 #786118 #2F7818
monochromatic
#0A051A #1C0E45 #311878 #4622AB #5E34D6

Accessibility & contrast

On white

13.70
#311878 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#311878 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311878
13.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311878#FFFFFF#000000##FFFFFF
##3118781.0013.701.5313.70
#FFFFFF13.701.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307B
Deuteranopia (green-blind)
#002A76
Tritanopia (blue-blind)
#0E3447
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #311878;
/* rgb */ color: rgb(49, 24, 120);
/* oklch */ color: oklch(31.6% 0.150 286.0);
Tailwind
colors: {
  custom: {
    50: '#7358a0',
    500: '#311878',
    950: '#000000',
  },
}
SCSS
$custom: #311878;
$custom-light: #7358a0;
$custom-dark: #000000;
JSON
{
  "hex": "#311878",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 120
  },
  "hsl": {
    "h": 255.625,
    "s": 66.667,
    "l": 28.235
  },
  "oklch": {
    "l": 0.31557,
    "c": 0.15002,
    "h": 286
  },
  "luminance": 0.02662
}

Semantic roles & 50–950 ramp

primary
#311878
secondary
#90AD3F
accent
#EA3EBD
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#09030F
muted
#7B787F

Preview Lab

Preview with #311878

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

Preview Lab → · Contrast checker → · Palette generator →

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