# Blue border/margin around rectangle

**URL:** <https://discourse.processing.org/t/blue-border-margin-around-rectangle/27896>\
**Category:** Beginners\
**Created:** [February 18, 2021, 5:00am UTC](https://discourse.processing.org/t/blue-border-margin-around-rectangle/27896 "2021-02-18T05:00:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tea\_tree](https://avatars.discourse-cdn.com/v4/letter/t/d6d6ee/32.png) [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Post date:** [February 18, 2021, 5:00am UTC](https://discourse.processing.org/t/blue-border-margin-around-rectangle/27896/1 "2021-02-18T05:00:07Z")

</div>

I’m facing a weird problem. When I draw a rectangle as part of my HUD, it is drawn with a blue border even though I don’t actually ever specify this color in my code anywhere. Do you have any idea why this is and how to get rid of it? This is the relevant part of the code:

```auto
// Add title
void addTitle() {
  cam.beginHUD();
  fill(120);
  rect(0, 0, width, 35);
  fill(255);
  textAlign(CENTER);
  textSize(100); // hack to make font render more smoothly
  scale(0.2);
  text("My title", 3232, 100);
  cam.endHUD();
}

```

This is what it looks like:

 ![Screen Shot 2021-02-17 at 8.58.41 PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/7b34ffffdabe92864666d5e5f36f61f2f82ae004.png)

---

<div class="post-metadata">

**Author:** ![MiguelSanches](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/miguelsanches/32/11172_2.png) [@MiguelSanches](https://discourse.processing.org/u/MiguelSanches)\
**Post date:** [February 19, 2021, 9:20am UTC](https://discourse.processing.org/t/blue-border-margin-around-rectangle/27896/2 "2021-02-19T09:20:44Z")

</div>

Hi @tea_tree

I might be guessing but do you have at any point of your code definition of line stroke with that color?

Best regards

---

<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 19, 2021, 10:53am UTC](https://discourse.processing.org/t/blue-border-margin-around-rectangle/27896/3 "2021-02-19T10:53:43Z")

</div>

I agree.

Try noStroke(); before the rect command

> [@tea\_tree](#):
>
> `hack to make font render more smoothly`

Also, to improve the font in 3D:

```auto
  //text 
  textMode(SHAPE);

```

I also recommend to use a normal font size and get rid of scale(0.2);
