Change colour based on rotation angle

The following script gives a colour to each panel depending on the height of the panels:

Is there a way to do the same thing where the colour depends on the rotation angle of the panels instead?

Gradient change with angle of rotation.gh (5.1 MB)

Have a look at this:

Gradient change with angle of rotation_re.gh (5.1 MB)

-Kevin

1 Like

Thanks!