red method

Dimension red(
  1. Color color
)

Extracts the red channel of a color object.

Parameters: color - a color object. Returns: integer 0-255 Example: red(rgb(10, 20, 30)) Output: 10

Implementation

//
Dimension red(Color color) => Dimension(color.r);