Added white (for the grays) calendar color

This commit is contained in:
Brian Buller 2017-04-14 16:29:07 -05:00
parent 649314bb4d
commit 7800febdc5
1 changed files with 5 additions and 1 deletions

View File

@ -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)
}
}