greyscale method

Color greyscale(
  1. Color color
)

Remove all saturation from a color in the HSL color space; the same as calling desaturate(@color, 100%). Parameters: color: A color object. Returns: color Example: greyscale(hsl(90, 90%, 50%)) Output: #808080 // hsl(90, 0%, 50%)

Implementation

//
/// Parameters:
///   color: A color object.
///   Returns: color
/// Example: greyscale(hsl(90, 90%, 50%))
///   Output: #808080 // hsl(90, 0%, 50%)
///
Color greyscale(Color color) => desaturate(color, Dimension(100));