#311157#311157

#311157 is a dark, moderate violet. Relative luminance 0.017; OKLCH L 27.3% C 0.117 H 299.2°. Best body text is #FFFFFF at 15.57:1 contrast (WCAG AA passes).

Color values

HEX#311157
RGBrgb(49, 17, 87)
HSLhsl(267, 67%, 20%)
HSVhsv(267, 80%, 34%)
CMYKcmyk(43.7%, 80.5%, 0%, 65.9%)
CIE-LABlab(14.07, 31.62, -35.86)
CIE-LCHlch(14.07, 47.81, 311.40°)
OKLaboklab(27.34% 0.0572 -0.1025)
OKLCHoklch(27.34% 0.117 299.2)
XYZxyz(3.1869, 1.7419, 9.1833)
Luminance0.0174 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311157 #375711
analogous
#111457 #311157 #541157
triadic
#311157 #573111 #115731
tetradic
#311157 #571114 #375711 #115754
square
#311157 #571114 #375711 #115754
split-complementary
#311157 #575411 #145711
monochromatic
#0E051A #140724 #311157 #4E1B8A #6B25BD

Accessibility & contrast

On white

15.57
#311157 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.35
#311157 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311157
15.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311157#FFFFFF#000000##FFFFFF
##3111571.0015.571.3515.57
#FFFFFF15.571.0021.001.00
#0000001.3521.001.0021.00
##FFFFFF15.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002459
Deuteranopia (green-blind)
#002356
Tritanopia (blue-blind)
#282333
Achromatopsia (no color)
#242424

Design tokens & code

CSS
--color: #311157;
/* rgb */ color: rgb(49, 17, 87);
/* oklch */ color: oklch(27.3% 0.117 299.2);
Tailwind
colors: {
  custom: {
    50: '#6e5387',
    500: '#311157',
    950: '#000000',
  },
}
SCSS
$custom: #311157;
$custom-light: #6e5387;
$custom-dark: #000000;
JSON
{
  "hex": "#311157",
  "rgb": {
    "r": 49,
    "g": 17,
    "b": 87
  },
  "hsl": {
    "h": 267.429,
    "s": 67.308,
    "l": 20.392
  },
  "oklch": {
    "l": 0.27344,
    "c": 0.11737,
    "h": 299.2
  },
  "luminance": 0.01742
}

Semantic roles & 50–950 ramp

primary
#311157
secondary
#669034
accent
#EA3E9B
background
#F6F4F8
surface
#ECE7EF
border
#C7C3CA
text
#07020B
muted
#7A787C

Preview Lab

Preview with #311157

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

Preview Lab → · Contrast checker → · Palette generator →

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