# How do I cycle/lerp between multiple colors

**URL:** https://discourse.processing.org/t/how-do-i-cycle-lerp-between-multiple-colors/13441
**Category:** Coding Questions
**Created:** [August 17, 2019, 8:34pm UTC](https://discourse.processing.org/t/how-do-i-cycle-lerp-between-multiple-colors/13441 "2019-08-17T20:34:31Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![humayung](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/humayung/32/6089_2.png) [@humayung](https://discourse.processing.org/u/humayung)
#### Post date: [August 18, 2019, 1:34pm UTC](https://discourse.processing.org/t/how-do-i-cycle-lerp-between-multiple-colors/13441/7 "2019-08-18T13:34:43Z")

</div>

I guess you want to achieve something like this?

> [@LerpColor seamless motion](https://discourse.processing.org/t/lerpcolor-seamless-motion/11303/6):
>
> Here is what i get with that idea. Using RGB ColorMode now ArrayList\<Color\> colors; void setup() { size(700, 200); colors = new ArrayList\<Color\>(); target = color(random(255), random(255), random(255)); from = color(random(255), random(255), random(255)); // Push initial color for shown up on the screen for (int i = 0; i \< width/w; i++) { pushColor(); } noStroke(); } color start, end; color target; color from; int count = 0; //Change these two variable for different be…

you can ‘trick’ `lerpColor()` to cycle trough between some colors

---

_[View the full topic](https://discourse.processing.org/t/how-do-i-cycle-lerp-between-multiple-colors/13441)._
