Single-event colors



  • I use a Samsung mobile phone with Android 5.0. In the phone I us the calendar app DigiCal. The calendars I synchronize with my OS X Server. OS X has version 10.11.3, and the server application 5.0.15. On the server I create some calendars that synchronize fine with the mobile phone. When creating the calendars I also can give them their default colors.

    But now the problem. When I create an appointment in the mobile (DigiCal app) the appointment receives the calendar's default color, and so far sop good. But if I change the color to a color other than the calendar's default color, this color will change back to the default color at the next sync time. I have seen in DAVdroid that there is a setting called Manage calendar colors. In this case it doesn't matter if this setting is on or off. The behavior is the same.


  • developer

    Hello,

    DAVdroid doesn't support individual colors per event. Also, I didn't see a specification / CalDAV property for this yet …



  • Thanks for your answer.

    But why must DAVdroid change the color? Can't it just leave it as it is? Apparently DAVdroid change the color to the calendar's default color.


  • developer

    @Jan Assuming that you mean the event's (and not the calendar's) color: DAVdroid deletes and re-inserts the event as soon as it's updated (for instance, on the server). Theoretically, it could update the record, but I didn't see a reason yet. Also, the color will not be synchronized to other devices or the server, so its use would be quite limited…



  • Thanks, I accept your explanation.

    If I synchronize my calendar with Google calendar instead, the color works perfect, I can change the event's color without any problems. So I just thought it would be possible even with DAVdroid. But it doesn't seems so. Thanks anyway.


  • developer

    @Jan iCalendar doesn't provide event colors by default. If you find some information about which iCalendar property can to be used for per-event colors, please let us know.



  • @rfc2822

    I don't use iCalendar. It is the app DigiCal in my Android mobile I use. DigiCal handles event colors that can be synchronized with Google calendar but not with my OS X server with the help of DAVdroid.


  • developer

    @Jan iCalendar is the file type/format which is used to exchange events between CalDAV clients and servers. It doesn't define colors for calendars or events, but someone (Apple) may have defined a proprietary iCalendar property for event colors.



  • Same issue for the app Business Calendar.
    DavDroid resets the custom color after synchronizing although the event has not been altered on the server or on the device (exept event color which is not supported in ical).
    I just like to use it as a additional reminder / categorization on my phone, so it does not need to be synced.


  • developer

    I have tried with Digical and Owncloud and could not reproduce the problem that single-event colors are reset after uploading (only when the event has changed on the server, as explained above).

    Therefore, I guess that your servers change the event after uploading (which is allowed in CalDAV), so that DAVdroid has to immediately download the event again and then the color is removed.

    To confirm this, verbose logs of an upload where the color is reset would be required.



  • FWIW, the COLOR property is defined since October in https://tools.ietf.org/html/rfc7986


  • developer

    @untitaker Thanks! Have tagged it as enhancement.


  • developer


  • developer

    Funnily, RFC 7986 allows only a fixed set of colors (the named colors of CSS Color Module Level 3 section 4.3), while Android allows all RGBA values. For converting Android → iCal, we would need to find the nearest color in a chosen color space and then use its color name :)



  • CSS defines a translation table to RGB for all of its color names, that should be simple enough to implement.

    It would be nice if one could choose their own table (colorscheme) though.


  • developer

    @untitaker said in Single-event colors are reset when syncing:

    CSS defines a translation table to RGB for all of its color names, that should be simple enough to implement.

    I know, but for the other direction… arbitrary RGBA value → CSS3 color name


  • developer

    Has been implemented with ical4android/c9af1962 and davdroid/f94d2f7a.

    There seems to be a lack of support by calendar apps (including Google Calendar, which crashes when setting an event color), but synchronizing works and the events are shown in the correct color. Maybe another calendar app can be used to set event colors; we're in contact with aCalendar about that.


  • developer

    Has now been successfully tested with DigiCal and the new beta of aCalendar (they had to change something). Should work with other calendar apps, too.

    However, I'm still looking for a server/Web UI which supports per-event colors



  • Does this mean what I think ?
    If a color is set on the device through the calendar app, then you will upload it to the server with the tag COLOR: ?
    Or, if the tag COLOR: is set on the server, then it will arrive in the calendar ?

    In this case, I use Informant that can set a per-event color, this color is handled by other applications (eg : Pure Grid widget, Google Agenda, Wear apps...)

    On desktop side, I know that Thunderbird doesn't set this value (instead if uses the CATEGORIES field, and categories are matched locally to a color).
    Outlook CaldavSynchronizer doesn't neither, but maybe it can be set through the manual mapping of extended Outlook fields.


  • developer

    @mister_slowhand said in Single-event colors:

    Does this mean what I think ?
    If a color is set on the device through the calendar app, then you will upload it to the server with the tag COLOR: ?
    Or, if the tag COLOR: is set on the server, then it will arrive in the calendar ?

    Exactly :) As specified in RFC 7986 5.9 COLOR Property.


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.