Found some problem with color

color c= color(#2f4f4f);
color b= color(115,10,100);
color a= color(0,100,255);

void setup() {
   size(500,500);
   background(255);
   for(int i = 0; i<100; i++) {
     rett(int(random(width)), int(random(height)), 
     color(random(b), random(a), random(c))
   }
}

void draw(){  
}

void rett ( int posizioneX, int posizioneY, colore) { 
  for(int a=100; a>0; a=a-10) { stroke(255,0,0);
    fill(random(a,b,c));
    rectMode(CENTER);
    rect(posizioneX+50, posizioneY+30,a,a);
   }
}

The question is: Why is this codes wrong?
I want the effect like photo. So much colours in same rect. Thank you, i need to understand for classroom assignment

1 Like

should be fill(colore);

OR

fill(color(random(b), random(a), random(c)));

When I write as you said: i view a lot of full Black rect. Unbelievable. Iā€™m gettin mad For this code xD

fill(color(random(256), random(255), random(255)));

2 Likes

Oh now this code works! Thank you appreciated man!

1 Like

Post your entire code and then we can discuss it