From 32f638f6aaf6ade56a2c160ee0e528021510c398 Mon Sep 17 00:00:00 2001 From: velvettear Date: Tue, 21 Nov 2023 11:01:01 +0100 Subject: [PATCH] fixed parsing color values to hex --- internal/slideshow/palette.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/slideshow/palette.go b/internal/slideshow/palette.go index d2ee1cc..c0317dc 100644 --- a/internal/slideshow/palette.go +++ b/internal/slideshow/palette.go @@ -65,5 +65,5 @@ func getColorPalette(image string, amount int) ([]color.Color, error) { // parse rgb color values to hex func rgbToHex(color color.Color) string { r, g, b, _ := color.RGBA() - return fmt.Sprintf("#%02x%02x%02x", r, g, b) + return fmt.Sprintf("%02x%02x%02x", uint8(r>>8), uint8(g>>8), uint8(b>>8)) }