# Why default Black color in chrome

**URL:** https://discourse.processing.org/t/why-default-black-color-in-chrome/32888
**Category:** Beginners
**Tags:** homework
**Created:** [October 17, 2021, 4:06pm UTC](https://discourse.processing.org/t/why-default-black-color-in-chrome/32888 "2021-10-17T16:06:19Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Cere1998](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@Cere1998](https://discourse.processing.org/u/Cere1998)
#### Post date: [October 17, 2021, 4:06pm UTC](https://discourse.processing.org/t/why-default-black-color-in-chrome/32888/1 "2021-10-17T16:06:19Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/8/8b686c2188b18fb0165d04827e449c262021b90c.png)

New to p5.js how come my default color is black when i run it in chrome? using brackets

function setup() {  
createCanvas(480,120);  
}

function draw() {  
rect(180, 60, 220, 40);  
}

---

<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: [October 17, 2021, 4:33pm UTC](https://discourse.processing.org/t/why-default-black-color-in-chrome/32888/2 "2021-10-17T16:33:19Z")

</div>

Use fill command eg

fill(210);

or fill(255,0,0); before rect() command

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [October 17, 2021, 4:40pm UTC](https://discourse.processing.org/t/why-default-black-color-in-chrome/32888/3 "2021-10-17T16:40:47Z")

</div>

Hello,

> [@Cere1998](#):
>
> New to p5.js how come my default color is black when i run it in chrome?

I tried this on a W10 Pro PC with the [p5.js editor](https://p5js.org/) and the p5.js mode with [Processing IDE](https://processing.org/) and used Google Chrome and got the same results:

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/8/89b713154767e31788de87cf6a34678abcaaaf06.png)

I do not know why the default is black in your case.

What version are you using?

For example:  
[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js](https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js)

I assume you have the latest Google Chrome.

Running on PC, Chromebook, tablet or phone?

`:)`

---

<div class="post-metadata">

### Author: ![Cere1998](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@Cere1998](https://discourse.processing.org/u/Cere1998)
#### Post date: [October 18, 2021, 12:24am UTC](https://discourse.processing.org/t/why-default-black-color-in-chrome/32888/4 "2021-10-18T00:24:38Z")

</div>

I’m using Brackets1.14.2 on wind 10

---

<div class="post-metadata">

### Author: ![Cere1998](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@Cere1998](https://discourse.processing.org/u/Cere1998)
#### Post date: [October 18, 2021, 12:50am UTC](https://discourse.processing.org/t/why-default-black-color-in-chrome/32888/5 "2021-10-18T00:50:27Z")

</div>

But when i remove createCanvas it became white

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [October 18, 2021, 10:48am UTC](https://discourse.processing.org/t/why-default-black-color-in-chrome/32888/6 "2021-10-18T10:48:18Z")

</div>

Hello,

I do not use Brackets and can’t comment further on this.

References:  
[learn | p5.js](https://p5js.org/learn/) \< The _ **Using a local server** _ section comments on Brackets.

`:)`
