Added a few more colors

This commit is contained in:
Brian Buller 2017-03-30 10:37:06 -05:00
parent 544a579649
commit 649314bb4d

13
main.go
View File

@ -101,8 +101,15 @@ func main() {
case "defaults":
// Show Defaults
for i := range state.account.ActiveCalendars {
fmt.Println(state.account.ActiveCalendars[i])
for _, v := range state.account.ActiveCalendars {
if c, err := state.account.GetCalendarById(v); err == nil {
var colDef *calendar.ColorDefinition
if colDef, err = state.account.GetCalendarColor(c.Id); err != nil {
fmt.Println(err.Error())
return
}
fmt.Println(CalColToAnsi(*colDef).Sprint(" ") + " " + colDef.Background + " " + c.Summary)
}
}
case "delete":
@ -451,7 +458,7 @@ func CalColToAnsi(col calendar.ColorDefinition) *color.Color {
return colCyan, nil
case "#f83a22", "#ac725e":
return colRed, nil
case "#fad165", "#ff7537", "#e6c800":
case "#fad165", "#ff7537", "#e6c800", "#fbe983", "#ffad46":
return colYellow, nil
}
return 0, errors.New("Not found")