Added white (for the grays) calendar color
This commit is contained in:
6
main.go
6
main.go
@@ -446,7 +446,7 @@ func CalColToAnsi(col calendar.ColorDefinition) *color.Color {
|
||||
colRed := 4
|
||||
colMagenta := 5
|
||||
colYellow := 6
|
||||
//colWhite := 7
|
||||
colWhite := 7
|
||||
|
||||
var hexToAnsi = func(hex string) (int, error) {
|
||||
switch strings.ToLower(hex) {
|
||||
@@ -460,6 +460,8 @@ func CalColToAnsi(col calendar.ColorDefinition) *color.Color {
|
||||
return colRed, nil
|
||||
case "#fad165", "#ff7537", "#e6c800", "#fbe983", "#ffad46":
|
||||
return colYellow, nil
|
||||
case "#c2c2c2":
|
||||
return colWhite, nil
|
||||
}
|
||||
return 0, errors.New("Not found")
|
||||
}
|
||||
@@ -500,6 +502,8 @@ func CalColToAnsi(col calendar.ColorDefinition) *color.Color {
|
||||
ret.Add(color.BgMagenta)
|
||||
case colYellow:
|
||||
ret.Add(color.BgYellow)
|
||||
case colWhite:
|
||||
ret.Add(color.BgWhite)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user