In Processing, I can call fill(myRGBValue)
to set a fill color. Is there a way for me to query for the current fill color?
Sure, just use something like:
int fillColor = g.fillColor;
g is the name of the default renderer. You can also get the stroke color using g.strokeColor. Both of these take into account noFill() and noStroke().
Note though that will probably only work in the Java version of Processing, not P5.js which works differently under the hood.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With