Single-event colors


  • 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.



  • Great !!!

    Have you seen the questions I posted yesterday ? One of those was exactly that. But there is still the link to the existing status that I don’t see how to recover ?
    Right now, I have the colors set in an internal calendar, synced through MyPhoneExplorer, based on the category colors in Outlook. From what I saw, I cannot set Davdroid to sync this Android calendar to a new collection on the Davical server ? Every collection has to go to a new calendar ?
    So I just see two ways of having the colors from my (massive) existing list of events : have the outlook/davical sync do the job based on the category color (desktop side). Or have it done Android-side, with a matching rule from one populated field (I’m thinking CATEGORIES from my use, but could be something else, even an extended attribute) to set the color…



  • I still have the same problem as the OP, even when activating single event colors in the DAVdroid settings. When I add an event in Business Calendar 2 with a custom event color, it is properly shown. However after synchronizing once - or adding a different event - the event color is lost and reset to the calendar color.

    My calendar server is Horde 5.2.10 by the way, I’d like to know if this is a known DAVdroid problem or the problem lies with the app or perhaps the server, there is no error message. But according to this FAQ entry, since I use BC2 and DAVdroid it should work, right? There’s nothing mentioned of needing a specific calendar server.


  • developer

    @natanji Horde is known to reset VCard properties it does not know (see https://www.davdroid.com/tested-with/horde/#c111); maybe it shows the same behavior for events. Verbose logs would be needed to verify that.


Log in to reply
 

Similar topics

  • 13
  • 1
  • 7