float colors always in range 0.0-1.0 for consistency
This commit is contained in:
parent
82290ace4a
commit
ffd40c721e
1 changed files with 1 additions and 1 deletions
2
color.go
2
color.go
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue