lightness method

Dimension lightness(
  1. Node color
)

Extracts the lightness channel of a color object in the HSL color space.

Parameters: color - a color object. Returns: percentage 0-100 Example: lightness(hsl(90, 100%, 50%)) Output: 50%

Implementation

Dimension lightness(Node color) => Dimension(toHSL(color).l * 100, '%');