Page 1 of 1

Hue Cycler

Posted: June 28th, 2020, 2:09 pm
by jumpsplat120
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...


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: Select all

 - 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

Re: Hue Cycler

Posted: June 29th, 2020, 10:04 am
by mcmonkey
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.

Re: Hue Cycler

Posted: June 30th, 2020, 2:46 pm
by jumpsplat120
Awesome, that tag was so helpful! Thanks so much.