# Rule for color random cycle

**URL:** <https://community.openhab.org/t/rule-for-color-random-cycle/47414>\
**Category:** Scripts & Rules\
**Created:** [July 5, 2018, 7:22pm UTC](https://community.openhab.org/t/rule-for-color-random-cycle/47414 "2018-07-05T19:22:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![enschy](https://community.openhab.org/letter_avatar_proxy/v4/letter/e/3ec8ea/32.png) [@enschy](https://community.openhab.org/u/enschy)\
**Post date:** [July 5, 2018, 7:22pm UTC](https://community.openhab.org/t/rule-for-color-random-cycle/47414/1 "2018-07-05T19:22:03Z")

</div>

Hello all,  
I am new to OH2 and i have 2 color items on dmx working (RGB Leds). Now i want a rule, which cycle through all colors, start and stop with an switch item. But i have no plan how to setup this as rule.

Thanks

---

<div class="post-metadata">

**Author:** ![hr3](https://community.openhab.org/letter_avatar_proxy/v4/letter/h/48db29/32.png) [@hr3](https://community.openhab.org/u/hr3)\
**Post date:** [July 5, 2018, 7:57pm UTC](https://community.openhab.org/t/rule-for-color-random-cycle/47414/2 "2018-07-05T19:57:18Z")

</div>

> [@Rule to cycle through all light colors](https://community.openhab.org/t/rule-to-cycle-through-all-light-colors/24778):
>
> Hey Folks, I’m looking to create a rule that will cycle through all colors for an RGB bulb. I created a rule that i’ll post below but it’s heavy and not overly reliable. I think there’s a race condition in there somewhere but I can’t isolate it. I’m hoping someone else has attempted this and has a better solution. Currently I have hue bulbs and I read something about sending a command to the API to change the colour the way I want. However, I didn’t understand much of what I was reading an…
