smudge / nightlight

A CLI for configuring "Night Shift" on macOS 🌕🌖🌗🌘🌑
MIT License
197 stars 8 forks source link

Support Kelvin as temperature input #12

Closed smudge closed 3 years ago

smudge commented 4 years ago

In addition to a number from 0-100 (the macOS config format) we can use a more standardized expression of color temperature, like so:

nightlight temp 4000K

Lower and upper bounds should be these (parity with Linux/GSettings night light):

nightlight temp 3500K
nightlight temp 6000K
tjtelan commented 3 years ago

I made an attempt. I didn't touch your error messages since I wasn't sure where else they were being used. However, I do bounds checking for kelvin temps outside of your specified range. LMK what you think. Thanks!