Color():red()
Extracts the red color value from a hex color string.
Description
The red()
method extracts the red channel value from a hex color string. The hex color should be in the format "#RRGGBB" where RR represents the red component. This method returns the decimal value (0-255) of the red component.
Signature
red(): number
Returns
number
- The red channel value (0-255) from the hex color