fix kelvin validation range
This commit is contained in:
parent
77c320d2a8
commit
4e03e59bad
2
color.go
2
color.go
@ -136,7 +136,7 @@ func NewPink() (HSBKColor, error) { return NewHSColor(HuePink, 1) }
|
|||||||
func NewWhite(k int16) (HSBKColor, error) {
|
func NewWhite(k int16) (HSBKColor, error) {
|
||||||
var c HSBKColor
|
var c HSBKColor
|
||||||
|
|
||||||
if k < 1500 || k > 8000 {
|
if k < 1500 || k > 9000 {
|
||||||
return c, errors.New("kelvin must be between 1500-9000")
|
return c, errors.New("kelvin must be between 1500-9000")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user