Displays the current time as a hexadecimal colour.
The program uses Epoch time to determine the current time, and calculates a hex value based on the digits. The time is accurate to the current second, and the total timestamp is seven digits long.For example, the Epoch time as I am writing this is
1443018567
, the program only uses 3018567
.
From there, it determines hex values by grouping the digits into two, so the smallest hex digit would be 67 mod 16
,
and the next one would be 56 mod 16
.
This ensures that, eventually, every single colour would be displayed. And since the colour changes every second, and there are 16^6 possible colours, it would take approximately 16,777,216 seconds, or 3.7 years, to display a colour that has already been seen.