Calendar - setColor with no CSS edition


Does somebody have an elegant (or even not !) solution to set a task-color in the Calendar component ?
We can do that with some CSS edition, but it’s a big limit.
The current case : each user can select its own color with ColorPicker component, this color should be the one in use in the calendar for their tasks.


You can store the color in the database and inject it as a CSS rule with Page.getStyles().add(). You can do this also dynamically with the ColorPicker when the user is choosing the styles.

Good example of this using the ColorPicker