This commit is contained in:
Bernard Xie 2023-02-27 16:10:00 -08:00
parent 66083e2d98
commit 63ffcba215
No known key found for this signature in database
GPG key ID: 3C3E0036CE0F892C

View file

@ -169,7 +169,7 @@ func Hex2RGB(hex string) (RGB, error) {
if hex[0:1] == "#" {
hex = hex[1:]
} else {
return RGB{}, nil
return RGB{}, fmt.Errorf("cannot parse hex color %v", hex)
}
values, err := strconv.ParseUint(hex, 16, 32)
if err != nil {