mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 06:54:58 +02:00
More work on porting diff kitten
This commit is contained in:
@@ -158,14 +158,14 @@ func ParseColor(color string) (RGBA, error) {
|
||||
}
|
||||
|
||||
type NullableColor struct {
|
||||
Color RGBA
|
||||
IsNull bool
|
||||
Color RGBA
|
||||
IsSet bool
|
||||
}
|
||||
|
||||
func ParseColorOrNone(color string) (NullableColor, error) {
|
||||
raw := strings.TrimSpace(strings.ToLower(color))
|
||||
if raw == "none" {
|
||||
return NullableColor{IsNull: true}, nil
|
||||
return NullableColor{}, nil
|
||||
}
|
||||
c, err := ParseColor(raw)
|
||||
return NullableColor{Color: c}, err
|
||||
|
||||
Reference in New Issue
Block a user