# Fill() not working in program

**URL:** https://discourse.processing.org/t/fill-not-working-in-program/35239
**Category:** Beginners
**Tags:** homework
**Created:** [February 17, 2022, 4:03pm UTC](https://discourse.processing.org/t/fill-not-working-in-program/35239 "2022-02-17T16:03:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nbrugger](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@nbrugger](https://discourse.processing.org/u/nbrugger)
#### Post date: [February 17, 2022, 4:03pm UTC](https://discourse.processing.org/t/fill-not-working-in-program/35239/1 "2022-02-17T16:03:37Z")

</div>

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?

```auto
  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);
      }
    }
  }
```

---

<div class="post-metadata">

### Author: ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)
#### Post date: [February 17, 2022, 4:38pm UTC](https://discourse.processing.org/t/fill-not-working-in-program/35239/2 "2022-02-17T16:38:08Z")

</div>

That’s a pretty narrow, thin rectangle.

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [February 17, 2022, 4:43pm UTC](https://discourse.processing.org/t/fill-not-working-in-program/35239/3 "2022-02-17T16:43:01Z")

</div>

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

---

<div class="post-metadata">

### Author: ![nbrugger](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@nbrugger](https://discourse.processing.org/u/nbrugger)
#### Post date: [February 17, 2022, 7:14pm UTC](https://discourse.processing.org/t/fill-not-working-in-program/35239/4 "2022-02-17T19:14:16Z")

</div>

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