From 5a516242e8cb9e8318a99262a47b0b0fd1d386e5 Mon Sep 17 00:00:00 2001 From: Quetzalcoatl Date: Thu, 4 Apr 2024 20:20:14 +0200 Subject: [PATCH] Fixed bug in RGBBytes Blue bytes were generated from value for green --- tinysvg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinysvg.go b/tinysvg.go index 73221a3..536b699 100644 --- a/tinysvg.go +++ b/tinysvg.go @@ -239,7 +239,7 @@ func (svg *Tag) Stroke2(c *Color) { func RGBBytes(r, g, b int) []byte { rs := strconv.FormatInt(int64(r), 16) gs := strconv.FormatInt(int64(g), 16) - bs := strconv.FormatInt(int64(g), 16) + bs := strconv.FormatInt(int64(b), 16) if len(rs) == 1 && len(gs) == 1 && len(bs) == 1 { // short form return []byte("#" + rs + gs + bs)