It appears CalDav Event coloring is not supported - all events of one same calendar have the same color - the calendar's master color!
I am looking for an alternative way to get colored events within a "master-calendar" without creating as many calendars on my server as I have colors.
My first idea: create different calendars with different colors. Two issues here 1. Can I set a calendar's color via CalDav?
- Is it possible to "embed" different calendars in one "master calendar", having one color for each sub-calendar?
The reason I'd like to achieve something similar is that I'd like to avoid creating several accounts for each one of the sub-calendar, which would, in turn, force the user to register calendars individually (ok, I could use auto-detection, but it makes things a bit more complex for syncing in my case-study).
Does anyone have a suggestion for this?
There is no RFC'ed standard on how to do colors on either calendars or events.
The iOS and OSX calendar clients only support a single calendar color, they can't color individual events (unlike Outlook, which has that extra 'color categories' feature).
You can set the Apple colors of a calendar via WebDAV. It is a (currently undocumented) Apple specific extension, a property on the calendar collection. Sample:
Use a regular PROPPATCH to set the color on an existing calendar (or within MKCOL when creating a collection):
Unfortunately it is not possible to embed calendars in other calendars in CalDAV: "Collections contained in calendar collections MUST NOT contain calendar collections at any depth, i.e., "nesting" of calendar collections within other calendar collections at any depth is not allowed." RFC 4791
Worse, most clients do not even allow calendars within arbitrary DAV collection hierarchies (that is, they only look at the calendar-home as a flat list and do not traverse non-calendar subcollections).
Summary: There is no 'reasonable' way to support per event colors, primarily because the Apple clients simply do not have that feature.
P.S.: Other CalDAV clients may have that feature (e.g. BusyCal), and embed the color in an event via an iCalendar X property, or again using a custom DAV property.