Fill() not working in program

I am doing this code for a project in school and the fill function is not working. No matter what I do the rectangle always shows up as black. Could someone tell me what I am doing wrong?

  void Show(){
    for(int y = 0; y < 10; y++){
      for(int x = 0; x < 10; x++){
        fill(4,255,3);
        rect(pos.x + x, pos.y + y, 1,1);
      }
    }
  }

That’s a pretty narrow, thin rectangle.

Yeah, try noStroke(); before the rect() command and also make it bigger

I tried that and it worked! Thanks so much. I was really close to giving up. Again thanks so much!

1 Like