red()
Color / Creating & ReadingDescription
Extracts the red value from a color.
Syntax
float red(color c)
Parameters
| Name | Type | Description |
|---|---|---|
| c | color | any color value |
Returns
floatRelated
Under the Hood
From Processing.h:
float red(color c);
Under the Hood
From Processing.cpp:
float PApplet::red(color c) { unsigned int v=c.value; return (v>>16&0xFF)/255.0f*colorMaxH; }