The color of the day

One of the themes I am exploring with my clock is to eliminate the need for clock hands and communicate the time through gradient of colors. One of the first experiments I came up with was to eliminate the clock hands to communicate how my day time is remaining.

For that, I set the following goal for my sketch.

1) Determine dawn, dusk, sunrise, sunset timings.

2) make a gradient move across the screen based on the amount of sun-time remaining.

3) Make it flexible so that swapping colors will be easy to experiment with.

4) All calculations are based off actual screen dimensions.

5) All the transforms are being done with HSVLuv.

The clock can be found running at: https://editor.p5js.org/AbolTaabol/sketches/xhzeY171S

An animated version of the sketch can be found here: https://editor.p5js.org/AbolTaabol/sketches/ks2nUDVNV