This has been already done, I have been using redshift for years:
https://github.com/jonls/redshift
Here is a comparison between Iris and f.lux https://iristech.co/best-alternative-to-f-lux/
I will do comparison between Iris and Redshift also soon :)