mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-22 05:33:45 -04:00
hsl: add our own implementations of rgb-to-hsl and hsl-to-rgb
* New function: rgb_to_hsl() * New function: hsl_to_rgb() * Replace XTerm’s hls_to_rgb() with our own, hsl_to_rgb(). * Ensure hue/lum/sat values are within range before calling hsl_to_rgb() Note that sixels’ use the following primary hues: * blue: 0° * red: 120 * green: 240° While “standard” HSL uses: * red: 0° * green: 120° * blue: 240° Thus, we need to adjust the sixel’s hue value before calling hsl_to_rgb().
This commit is contained in:
parent
8e779b356e
commit
e0297daa1f
6 changed files with 124 additions and 136 deletions
|
|
@ -111,6 +111,7 @@ executable(
|
|||
'extract.c', 'extract.h',
|
||||
'fdm.c', 'fdm.h',
|
||||
'grid.c', 'grid.h',
|
||||
'hsl.c', 'hsl.h',
|
||||
'input.c', 'input.h',
|
||||
'log.c', 'log.h',
|
||||
'macros.h',
|
||||
|
|
@ -125,7 +126,6 @@ executable(
|
|||
'server.c', 'server.h',
|
||||
'shm.c', 'shm.h',
|
||||
'sixel.c', 'sixel.h',
|
||||
'sixel-hls.c', 'sixel-hls.h',
|
||||
'slave.c', 'slave.h',
|
||||
'spawn.c', 'spawn.h',
|
||||
'terminal.c', 'terminal.h',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue