Using Colors
Any geometric primitive we draw on the screen uses a particular fill and stroke color. If we don’t say otherwise, Processing will default to a black stroke and a white fill color. We can use the fill and stroke methods to change default values, and we can also use grayscale, RGB, HSB, or hexadecimal color in the Android apps we create. The background method uses color in the same way, with the exception that it cannot set a value for opacity, formally known as the alpha value.
By default, Processing draws all graphic elements in the RGB (red, green, blue) color mode. An additional alpha value can be used as a fourth parameter to control the opacity of graphic elements drawn on the screen. An alpha value of 0 is fully transparent, ...
Get Rapid Android Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.