We are about to switch to a new forum software. Until then we have removed the registration on this forum.
so I have a blue ball here:
void setup(){
size(200,200);
}
void draw(){
background(255);
ball(20,22,174,255);
}
void ball(float size, int R, int G, int B){
noStroke();
fill(R,G,B);
ellipse(width/2,height/2,size,size);
}
I'd like to ask if it's possible to make my function looks this
ball(parameter1,color(__,__,__),parameter3,parameter4);
rather than having 3 parameters for RGB
Thank you for your help!
Answers
https://Processing.org/reference/color_.html
GoToLooP That's really helpful! Thanks!
Hi, I've got another piece of code here - they should be doing the same thing however I only see a black ball? Thank you
@ line # 16:
float col;
->color col;
L-)ah thanks a lot