You might notice Katy is having a bit of an interdimensional anomaly here. I implemented this as an experiment because it’s different from any color cycling effect I’ve ever seen before. Normally in color cycling there’s one position which is true, then the hues rotate until all of them are swapped, then they keep rotating until they’re back to true. In this one at any given moment there are two opposite hues which are true and the ones at 90 degrees from those are swapped, and the color cycling effect is rotating which angle is true. It’s also doing a much better job of keeping luminance constant due to using okhsl.
Code is here. It’s leaning on libraries for most of the work, but I did write some code to dither just the low order bits of the RGB values. That’s a technique which should be used more often. This effect would also work on animated video. You could even adjust the angle as a directorial trick, to draw the viewer’s eye towards particular things by making their color true.
(Now that I think about it low order bit dithering could be improved by using error in the okhsl gamut. It also be improved by other diffusion techniques, which in turn can be further improved by dynamically choosing which neighboring pixel most wants to have error in the opposite direction already. I’m going to exercise some self-control and not implement any of this, but you most definitely should pick it up where I left off. All video manipulation should be done in 16 bit color the entire time and only dithered down to 8 bit on final display.)
As a bonus, I also simplified the color swatches I gave previously into two separate ones, for light and dark backgrounds. Files are here and here.
All of the above is done within the limitations of the sRGB color space. The sRGB standard kind of sucks. It’s based off the very first color television which was ever made in 1954 and the standardization which came later made it consistent but not broader. Now that OLED is getting used everywhere my expectation is that things are going to start supporting Rec2100 under the hood and once that becomes ubiquitous new content will be produced in formats which support that extra color depth. It’s going to take a few years.