smoothly cycling through all colours

BlitzMax Forums/BlitzMax Beginners Area/smoothly cycling through all colours

One way that you can kind of emulate a hue shift, is to start out with red ie $FF0000. Then gradually increase the green component until $FFFF00. Then decrease the red component back down to 0 ie $00FF00. Then raise the blue component to $00FFFF. Then decrease green ie $0000FF. Then increase red to $FF00FF. Then decrease blue back to red $FF0000. This lets you cycle through RED-orange-YELLOW-GREEN-cyan-BLUE-indigo-VIOLET(magneta)-RED in a kind of linear fashion without having to convert to a HSB color model.