Same sketch. P5js version on the left and Java Processing version on the right.
Why the color difference for:
color(255, 0, 0, alpha); // alpha: 0 to 200
p5js is rendering as WEBGL. Java p5 is rendering as P3D.
Do they treat the fill color alpha channel differently? Are the lighting defaults different? Or is this a bug with p5js WEBGL?
I’ve tried forcing lighting to defaults by adding
lights() in the draw loop of both sketches. After doing so Java p5 output remains the same but p5js color looks even more dull.