Hi @FluffyMice. Thank you for sharing.
I think each area of the screen has a colour assosiated with it
Sort of. But your code creates the association. @William04GamerA mentioned “the basic 23 colors that is in-built in Hopscotch”. Each of those basic colors is associated with an integer (whole number) value. Like this:
So when your code has (self) X position / 50, it’s creating a range of values from
Min: 0 / 50 = 0
Max: 1024 / 50 = 20.48 (for an iPad)
The color block rounds the exact value to the closest integer, so you get colors 0 to 20 correlating to the X position.
Are you interested in using the HSB color values to give smoother colors similar to this?
If so, consider that you need only change the hue (the saturation and brightness can stay as default values (near 100). And Hue would need to range from 0 to 360. Give it a try! And I’ll be happy to explain more as needed.