Skip to content

melissamangos/ColourClock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Colour Clock

Displays the current time as a hexadecimal colour.

How it Works

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.

About

Displays current time as a hexadecimal value.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published