red()ColorCreating & ReadingWeb & Applicationred_.gif
noStroke();
color c = color(0, 126, 255);
fill(c);
rect(15, 20, 35, 60);
float value = red(c); // Sets "value" to "0"
fill(value);
rect(50, 20, 35, 60);
Extracts the red value from a color.
red(color)
any value of the color datatypefloat
green()
blue()
hue()
saturation()
brightness()
1.0FunctionCore