From 0fb8977c9477765be106f017c960c0c4b0ba6368 Mon Sep 17 00:00:00 2001 From: <> Date: Sun, 19 Mar 2017 23:43:08 -0700 Subject: [PATCH] Fixed issue where red/orange/yellow names are improperly colored. --- includes/colors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/colors.c b/includes/colors.c index 0682c2f..54efd1b 100644 --- a/includes/colors.c +++ b/includes/colors.c @@ -70,7 +70,7 @@ void rgb2hsl(struct Hls *dest, const struct Rgb const *src) { //piecewise function.. float hue; if (max == r) { - hue = (int)((g - b)/chroma) + (g < b ? 6 : 0); // % 6 will break magenta (255, 0, 255) + hue = ((g - b)/chroma) + (g < b ? 6 : 0); // % 6 will break magenta (255, 0, 255) } else if (max == g) { hue = ((b - r)/chroma) + 2.0f; } else {