Hue Cycler (DEPRECATED)

jumpsplat120

Helper
Staff member
Helper
Jun 24, 2020
59
8
8
www.jumpsplat120.com
Hue cycler is deprecated when monkey added the with_hue tag. Rainbow text generation is available in the Many Things library. Go check it out!


1.16 brought with is some pretty neat changes, such as the nether getting reworked. But you know what's even better than all of that? Access to the full gamut of rainbow colors! May I introduce...

HUE CYCLER




The following code is a single line script; therefore It should be incredibly simple to follow use. All you need to do is use a loop with a saved color to cycle through the hue!

The following code snippet is an example of using the script:

Code:
 - define color <color[255,0,0]>
    - repeat 100:
        - actionbar <[text].color[<[color]>]>
        - wait .02t
        - define color <[color].with_hue[<[color].hue.add[15]>]>

In the second define tag, the first value is your color you wish you change, and the second is the value you are changing the color by. I found that changing the value by around 15, and adding a .02t wait provides a nice smooth color change, but feel free to lower that value to slow down the change, or remove the wait to speed it up.

IMPORTANT: This script can be quite heavy, due to needing to be called a lot to be useful. Consider using it sparingly.

Here's a quick gif demonstration of the script in action (using the effect to this extent did reduce TPS, really only used for example)


EDIT: Bigger header
 
Last edited:

mcmonkey

Administrator
Staff member
Helper
the ColorTag.hue tag exists, which seems like it should be used here.
I added ColorTag.with_hue (and several related tags) to make using that here easier.