Dynamic Coloring with List

Hellp smart people!

I am currently creating a Riemann Sum calculator, based off of the default one in Desmos. Meaning, I have some number of rectangles according to n. I would like to create a custom color, C, such that the h value (within hsv) is equal to the current proportion according to n.

For example, when n is 1, C is just red, or 0. When n is 2, C is a list consisting of [0, 180], and when n is 3, C is [0,120,240]. I’d like this to continue, so that as n gets higher and higher, it creates a smoother and more coherent rainbow.

Thank you guys in advance :smiley:

Something like this, move n:
https://www.desmos.com/calculator/3yngfbvdii

1 Like

Update: Just solved it!

Solution:

Create a list of L_x = [1…length(listtocolor)]

Equation is (360L_x)/n

2 Likes

That slider is very satisfying!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.