# Trying to create a gradient color of orange

**URL:** https://discourse.processing.org/t/trying-to-create-a-gradient-color-of-orange/38996
**Category:** Beginners
**Created:** [September 27, 2022, 9:58pm UTC](https://discourse.processing.org/t/trying-to-create-a-gradient-color-of-orange/38996 "2022-09-27T21:58:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Shu](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@Shu](https://discourse.processing.org/u/Shu)
#### Post date: [September 27, 2022, 9:58pm UTC](https://discourse.processing.org/t/trying-to-create-a-gradient-color-of-orange/38996/1 "2022-09-27T21:58:32Z")

</div>

```auto
color c;
void setup() {
  size(1000, 1000);
  c = color(237, 115, 12);
  strokeWeight(4);
  rectMode(CENTER);
  noLoop();
}

void draw() {
  background(220);
  for(int i=0;i<=20;i++){
    circle(500,500,300-i*15);
  }
 for(int a=0;a<=100;a = a+2) {
   println("Even = "+ a);
 }
 for(int b=19;b>=-3;b = b-2) {
   println("Odd = "+ b);
 }
}

```

---

<div class="post-metadata">

### Author: ![debxyz](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@debxyz](https://discourse.processing.org/u/debxyz)
#### Post date: [September 27, 2022, 10:24pm UTC](https://discourse.processing.org/t/trying-to-create-a-gradient-color-of-orange/38996/2 "2022-09-27T22:24:29Z")

</div>

Hello @Shu  
Can you provide more information of what you are trying to do?  
I’m guessing you want to apply a stepped gradient to your nested circles?  
Please clarify.  
🤓

---

<div class="post-metadata">

### Author: ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)
#### Post date: [September 27, 2022, 11:31pm UTC](https://discourse.processing.org/t/trying-to-create-a-gradient-color-of-orange/38996/3 "2022-09-27T23:31:13Z")

</div>

Hi

> **[Simple Linear Gradient / Examples](https://processing.org/examples/lineargradient.html)**
>
> The lerpColor() function is useful for interpolating between two colors.

> **[Reference](https://processing.org/reference/lerpColor_.html)**
>
> Calculates a color between two colors at a specific increment. The amt parameter is the amount to interpolate between the two values where 0.0 is equal to the first point, 0.1 is very ne…

---

<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: [September 28, 2022, 12:22am UTC](https://discourse.processing.org/t/trying-to-create-a-gradient-color-of-orange/38996/4 "2022-09-28T00:22:26Z")

</div>

Hello @Shu,

You have not yet applied color to the circle and default is black.

Do you want to apply color to the stroke or fill the circle or both?

Look up references for these:

- stroke()
- noStroke()
- fill()
- noFill()

A gradient is the change in the value of a quantity.

If you are working with one color such as orange you can change the saturation or brightness.

Tutorial:

> **[Color](https://processing.org/tutorials/color/)**
>
> An introduction to digital color.

`:)`

---

<div class="post-metadata">

### Author: ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)
#### Post date: [September 28, 2022, 1:04am UTC](https://discourse.processing.org/t/trying-to-create-a-gradient-color-of-orange/38996/5 "2022-09-28T01:04:52Z")

</div>

> **[Color Gradients in Processing (v 2.0)](https://behreajj.medium.com/color-gradients-in-processing-v-2-0-e5c0b87cdfd2)**
>
> This tutorial on color gradients is an overhaul of a prior version; hopefully it will prove more useful to creative coders who wish to work…
