I tried tinting with tint(); but that only works with images, what should I do?
Do you mean just the color, not an image?
let fade_index = 255;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
fill(255, 0, 0, fade_index);
circle(width/2, height/2, 100);
fade_index--;
if(fade_index == 0) fade_index = 255;
}
2 Likes
[quote=“noel, post:2, topic:25727”]
fill(255, 0, 0, fade_index);
[/quote
Thank you so much, I’ve been sitting at this problem for some time. On the p5 website it doesn’t explain what alpha changes, I should have tried. I’m still new to this <3