diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2016-01-04 20:12:32 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2016-01-04 20:12:32 +0100 |
commit | 966cbb896949b50834709bc1eb9cc75d505e3148 (patch) | |
tree | e7cb23cdc5841b7bdc03a22c754c2b1c09572edd /src/blackbody.h | |
parent | macros (diff) | |
download | radharc-966cbb896949b50834709bc1eb9cc75d505e3148.tar.gz radharc-966cbb896949b50834709bc1eb9cc75d505e3148.tar.bz2 radharc-966cbb896949b50834709bc1eb9cc75d505e3148.tar.xz |
...
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r-- | src/blackbody.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/blackbody.h b/src/blackbody.h index 82331d2..95fa70a 100644 --- a/src/blackbody.h +++ b/src/blackbody.h @@ -18,6 +18,37 @@ /** + * The highest colour temperature in the table. + */ +#define HIGHEST_TEMPERATURE 40000 + +/** + * The lowest colour temperature in the table. + */ +#define LOWEST_TEMPERATURE 1000 + +/** + * The temperature difference between the colours in the table. + */ +#define DELTA_TEMPERATURE 100 + + + +/** + * Convert from CIE xyY to [0, 1] sRGB. + * + * @param x The 'x' component. + * @param y The 'y' component. + * @param Y The 'Y' component. + * @param r Output parameter for the “red” value. + * (Seriously, sRGB red is orange, just look at it fullscreen.) + * @param g Output parameter for the green value. + * @param b Output parameter for the blue value. + */ +void +ciexyy_to_srgb(double x, double y, double Y, double *r, double *g, double *b); + +/** * Get the [0, 1] sRGB values of a colour temperature. * * @param fd File descriptor for the colour table. |