After some thought - considering how I might do it for 4 bits - I had an idea. We can use the last 3 bits for 8 colours, then the next 2 bits can be used to set the brightness for a total of 32 colours - way more than we need. This brings up an interesting problem, if we say 00 is an unmodified colour, 01 is 25% brightness, 10 is 50% brightness, and 11 is 75% brightness, we are left over with some spare colours. When the last 3 bits are 0 and our colour is black, we essentially have duplicate values for 00-000, 01-000, 10-000, and 11-000.
It is partly for this reason that I decided to put all the potential colours in a hard-coded array, the other reason was so that I could do O(1) lookups to change the colour.
This meant that I had to change my code:
Here are the colours I chose for the hours, with the duplicate values left blank:
I have not yet released this functionality in an update so there is still time to change it. I want to learn how to use the settings API first, so that the user can choose to use this or use black and white, and set a custom background colour.
Here are some more screenshots to prove it does change colour with each minute.