From e0297daa1fcf90a911fd236971e1a2b433f7b134 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 15 Nov 2020 19:45:33 +0100 Subject: hsl: add our own implementations of rgb-to-hsl and hsl-to-rgb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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(). --- sixel-hls.h | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 sixel-hls.h (limited to 'sixel-hls.h') diff --git a/sixel-hls.h b/sixel-hls.h deleted file mode 100644 index 6d6b9f2f..00000000 --- a/sixel-hls.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -/* - * Primary color hues: - * blue: 0 degrees - * red: 120 degrees - * green: 240 degrees - */ -int hls_to_rgb(int hue, int lum, int sat); -- cgit v1.3