float colors always in range 0.0-1.0 for consistency

This commit is contained in:
Thomas Friedel 2020-02-28 08:53:59 +01:00
parent 82290ace4a
commit ffd40c721e

View file

@ -68,7 +68,7 @@ func parseColorComponent(value interface{}) (uint8, bool) {
} else if conv > 1 {
conv = 1
}
return uint8(conv), true
return uint8(math.Round(conv * 255.0)), true
} else {
conv, err := strconv.ParseUint(v, 10, 8)
if err != nil {