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