We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello all. I was wondering if there was a way I could change the color of a default sprite with no image defined for it in p5.play.js. I imagine it would be something like:
var sprite = createSprite(width/2, height/2, 50, 50);
sprite.color = #fff;
Any help on how I would go about this would be appreciated :)
Answers
http://p5play.MolleIndustria.org/docs/classes/Sprite.html#prop-shapeColor
One more quick question, what should the color argument be? I've tried rgb values and html color codes, but none of them work...
Datatype is p5.Color: https://p5js.org/reference/#/p5.Color
You color() function to get 1: https://p5js.org/reference/#/p5/color