Skip to content

Commit

Permalink
rotate HLS by 120 degrees (private email from John Z)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Oct 31, 2022
1 parent ed88059 commit 09ca1d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions coders/sixel.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ static int hls_to_rgb(int hue, int lum, int sat)
}
Magic1 = (int) (2 * (ssize_t) lum) - Magic2;

R = (hue_to_rgb(Magic1, Magic2, (ssize_t) hue + (HLSMAX / 3)) * RGBMAX + (HLSMAX / 2)) / HLSMAX;
G = (hue_to_rgb(Magic1, Magic2, hue) * RGBMAX + (ssize_t) (HLSMAX / 2)) / HLSMAX;
B = (hue_to_rgb(Magic1, Magic2, (ssize_t) hue - (HLSMAX / 3)) * RGBMAX + (HLSMAX/2)) / HLSMAX;
B = (hue_to_rgb(Magic1, Magic2, (ssize_t) hue + (HLSMAX / 3)) * RGBMAX + (HLSMAX / 2)) / HLSMAX;
R = (hue_to_rgb(Magic1, Magic2, hue) * RGBMAX + (ssize_t) (HLSMAX / 2)) / HLSMAX;
G = (hue_to_rgb(Magic1, Magic2, (ssize_t) hue - (HLSMAX / 3)) * RGBMAX + (HLSMAX/2)) / HLSMAX;
}
return SIXEL_RGB(R, G, B);
}
Expand Down

0 comments on commit 09ca1d6

Please sign in to comment.