fix float format string

This commit is contained in:
2020-03-05 20:21:18 -06:00
parent 46991b2ba3
commit 3a94226aa8

View File

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