function desaturate(amount, color) {
    if (color === 'transparent') return color;
    var hslColor = parseToHsl(color);
    return toColorString(_extends__default["default"]({}, hslColor, {
      saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))
    }));
  }
Decreases the intensity of a color. Its range is between 0 to 1. The first
argument of the desaturate function is the amount by how much the color
intensity should be decreased.

@example
// Styles as object usage
const styles = {
  background: desaturate(0.2, '#CCCD64'),
  background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
}

// styled-components usage
const div = styled.div`
  background: ${desaturate(0.2, '#CCCD64')};
  background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
`

// CSS in JS Output
element {
  background: "#b8b979";
  background: "rgba(184,185,121,0.7)";
}