# Declare and use array of colors

**URL:** https://discourse.processing.org/t/declare-and-use-array-of-colors/30785
**Category:** Beginners
**Created:** [June 18, 2021, 9:45pm UTC](https://discourse.processing.org/t/declare-and-use-array-of-colors/30785 "2021-06-18T21:45:00Z")
**Posts on this page:** 1
**Showing post:** 3

<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: [June 18, 2021, 10:15pm UTC](https://discourse.processing.org/t/declare-and-use-array-of-colors/30785/3 "2021-06-18T22:15:01Z")

</div>

> [@yalaniv](#):
>
> since the fill function require 3 numbers,  
> I wonder how to declare it and use it

“Wonder is the beginning of wisdom.” - Socrates

The Processing website has resources (tutorials, references and examples) here:  
[https://processing.org/](https://processing.org/)

The fill() function accepts:

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

Reference for the _color_ datatype:  
_[color / Reference / Processing.org](https://www.processing.org/reference/color_datatype.html)_

Example:

```auto
color c = #FF00FF; //Fuchsia

color[] col = {
              color(255, 0, 0), // Red
              0xFF00FF00, // Green
              #0000FF, // Blue
              c
              };

```

`:)`

---

_[View the full topic](https://discourse.processing.org/t/declare-and-use-array-of-colors/30785)._
