# About the Patterns and Code category

**URL:** <https://forum.electromage.com/t/about-the-patterns-and-code-category/145>\
**Category:** Patterns and Code\
**Created:** [December 14, 2019, 5:55pm UTC](https://forum.electromage.com/t/about-the-patterns-and-code-category/145 "2019-12-14T17:55:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wizard](https://forum.electromage.com/user_avatar/forum.electromage.com/wizard/32/4_2.png) [@wizard](https://forum.electromage.com/u/wizard)\
**Post date:** [December 14, 2019, 5:55pm UTC](https://forum.electromage.com/t/about-the-patterns-and-code-category/145/1 "2019-12-14T17:55:18Z")

</div>

Ask questions about creating patterns or code. Share tips and tricks.

- Post questions relating to pattern code
- Need help getting a pattern to do what you want?
- Have a cool bit of code that others might find handy? Share it here.

---

<div class="post-metadata">

**Author:** ![Wildersrobles](https://forum.electromage.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@Wildersrobles](https://forum.electromage.com/u/Wildersrobles)\
**Post date:** [March 14, 2020, 5:01pm UTC](https://forum.electromage.com/t/about-the-patterns-and-code-category/145/2 "2020-03-14T17:01:24Z")

</div>

Old Topic, can we revive this?

I want to create a simple flowing pattern for the scoot.  
I want to start with this code:  
modes[1] = (f, t) =\> (1 + f - t) % 1 // moving right

How can I make it two or three or four colors?  
Can I set a number of pixels to be one color, for example three pixels to be red (0)  
followed by two pixels to be white.

Is this possible?
