fix float format string

This commit is contained in:
Ryan Cavicchioni 2020-03-05 20:21:18 -06:00
parent 46991b2ba3
commit 3a94226aa8
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -65,7 +65,7 @@ func (c RGBColor) Hex() string {
func (c HSBKColor) ColorString() string {
var s []string
if c.H >= 0 {
s = append(s, fmt.Sprintf("hue:%f", c.H))
s = append(s, fmt.Sprintf("hue:%g", c.H))
}
if c.S >= 0 {
s = append(s, fmt.Sprintf("saturation:%g", c.S))