sct

set color temperature
git clone anongit@rnpnr.xyz:sct.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 0de52379321c80e58a2fe082d84c77fbd8a3d744
Parent: 6ee56eab6a783b69f82092e46163badaf1a61b78
Author: звездочёт
Date:   Thu,  8 Aug 2019 20:02:05 +0300

Resolve #10: References to sources

Co-Authored-By: Fabian Foerg <3429782+faf0@users.noreply.github.com>

Diffstat:
MCHANGELOG | 4++--
Msct.c | 12+++++++++++-
Mxsct.1 | 2+-
3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,10 +1,10 @@ PROJECT: https://github.com/faf0/sct 1.5: zvezdochiot on 08 Aug 2019 -* Option --verbose for debug +* Option --verbose to display debugging information 1.5: zvezdochiot on 07 Aug 2019 -* Approximation of the `redshift` table (no limits) +* Approximation of the `redshift` table from https://github.com/jonls/redshift/blob/04760afe31bff5b26cf18fe51606e7bdeac15504/src/colorramp.c#L30-L273 without limits 1.4: zvezdochiot on 04 Aug 2019 * Read current temperature diff --git a/sct.c b/sct.c @@ -38,19 +38,29 @@ static void usage(char * pname) "\tIf the argument is 0, xsct resets the display to the default temperature (6500K)\n" "\tIf no arguments are passed, xsct estimates the current display temperature\n" "Options:\n" - "\t-v, --verbose \t xsct will display debug information\n" + "\t-v, --verbose \t xsct will display debugging information\n" "\t-h, --help \t xsct will display this usage information\n", pname); } #define TEMPERATURE_NORM 6500 #define TEMPERATURE_ZERO 700 #define GAMMA_MULT 65535.0 +// Approximation of the `redshift` table from +// https://github.com/jonls/redshift/blob/04760afe31bff5b26cf18fe51606e7bdeac15504/src/colorramp.c#L30-L273 +// without limits: +// GAMMA = K0 + K1 * ln(T - T0) + // Red range (T0 = TEMPERATURE_ZERO) + // Green color #define GAMMA_K0GR -1.47751309139817 #define GAMMA_K1GR 0.28590164772055 + // Blue color #define GAMMA_K0BR -4.38321650114872 #define GAMMA_K1BR 0.6212158769447 + // Blue range (T0 = TEMPERATURE_NORM - TEMPERATURE_ZERO) + // Red color #define GAMMA_K0RB 1.75390204039018 #define GAMMA_K1RB -0.1150805671482 + // Green color #define GAMMA_K0GB 1.49221604915144 #define GAMMA_K1GB -0.07513509588921 diff --git a/xsct.1 b/xsct.1 @@ -16,7 +16,7 @@ sets the screen's color temperature. Display usage information and exit .TP .B -v, --verbose -Display debug information +Display debugging information .TP .I [temperature] Black body temperature