Calendar background setting not working

31 views
Skip to first unread message

Romain Schmid - admin

unread,
Jul 27, 2015, 3:30:20 AM7/27/15
to Google Apps Manager
Hi, 

I am trying to setup the resource calendars with some success. I fail at setting the background and foreground colors. 

Here's my gam command : 

gam user demo.calendar@xxx.ch add calendar xxx@resource.calendar.google.com colorindex 1 backgroundcolor #0101DF foregroundcolor #81F7F3



Terminal (I'm on a Mac) returns the common usage commands examples. If I remove the background and foreground colors, it works perfectly, including the colorindex. 

I've tried to remove the #, and gam detects the background parameter as it says that the html color needs a #.

Any clue ?

Thanks

Luke MacKinney

unread,
Jul 27, 2015, 9:20:15 AM7/27/15
to google-ap...@googlegroups.com
Have you tried Quotes around like  "backgroundcolor #0101DF" "foregroundcolor #81F7F3"

Just a wild guess.

--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/a1f4b64e-d485-490c-88a6-0158ca0a77eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ross Scroggs

unread,
Jul 27, 2015, 10:44:49 AM7/27/15
to google-ap...@googlegroups.com
There is a lot going on here.
Yes, the quotes are required as # is a comment symbol in the shell and the rest of the command line is discarded.
You either use colorindex or backgroundcolor/foregroundcolor but not both. Valid values for colorindex are 1 to 24.
If you lookup the values for colorindex 1, you get background color #ac725e and foregroundcolor #1d1d1d.
If you use the API to set these values you get an error on the foregroundcolor. If fact it appears that #000000 is the only acceptable value for foregroundcolor.
If you use the API to set the colorindex to 1, the response says that the backgroundcolor was set to #ac725e and the foregroundcolor was set to #000000, not #1d1d1d.
So, I'd give up on foregroundcolor.
But, there is a coding error in GAM that prevents backgroundcolor from being properly interpreted by the API. I have sent the corrections to Jay.
If you have the UNIX version of GAM and require an immediate fix and know what you're doing, here is a diff (on GAM 3.51) that shows the correction.
addCalendar
1593a1594
>   colorRgbFormat = False
1635a1637
>       colorRgbFormat = True
1638a1641
>       colorRgbFormat = True
1650c1653
<     callGAPI(service=cal.calendarList(), function=u'insert', body=body)
---
>     callGAPI(service=cal.calendarList(), function=u'insert', body=body, colorRgbFormat=colorRgbFormat)
updateCalendar
1657a1661
>   colorRgbFormat = False
1686a1691
>       colorRgbFormat = True
1689a1695
>       colorRgbFormat = True
1714c1720
<     callGAPI(service=cal.calendarList(), function=u'update', calendarId=calendarId, body=body)
---
>     callGAPI(service=cal.calendarList(), function=u'update', calendarId=calendarId, body=body, colorRgbFormat=colorRgbFormat)

Ross

Romain Schmid - admin

unread,
Jul 27, 2015, 11:10:58 AM7/27/15
to Google Apps Manager, ad...@epssc.ch
Thank you for your precise answer. I'll finally give up setting colors, I've chosen to use the colorindex instead. I had thought of the possibility that both colorindex AND background settings used in the same command would mess up, but not tested. 
Thanks for the answer and the coming fix !

Best regards, 

Romain
Reply all
Reply to author
Forward
0 new messages