nextcloud / calendar

📆 Calendar app for Nextcloud
https://apps.nextcloud.com/apps/calendar
GNU Affero General Public License v3.0
968 stars 236 forks source link

Custom color per event [$75] #71

Closed tobiasgraeber closed 4 years ago

tobiasgraeber commented 8 years ago

Hi, is it possible to add an Option, to change a meetings color in the calendar? (it is only defined by calendar-source colour as at the moment) ...sometimes there may be an important meeting and i want to make it stand out by red color for example...(without changing calendar). i think there should some color/Highlight function? any suggestions? maybe tags+a searchbox (filter) could also be great... #ux

--- Did you fix this issue? Go claim the **[$75 bounty](https://www.bountysource.com/issues/39954046-custom-color-per-event?utm_campaign=plugin&utm_content=tracker%2F45525646&utm_medium=issues&utm_source=github)** on [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F45525646&utm_medium=issues&utm_source=github).
tcitworld commented 8 years ago

Search is to be developed and tags is to be integrated some time too.

ccoenen commented 8 years ago

2016: I do not believe the ical standard has anything like this defined. Is there a precedence in another application? If so, how is that stored? I'd hate to see this implementation of the standard create its own island of unsupported fields.

2017: COLOR field! (sie comment by @georgehrke: https://github.com/nextcloud/calendar/issues/71#issuecomment-292620841)

georgehrke commented 8 years ago

Google calendar and Outlook have similar features, but they don't store it in the iCal data. If we implement this, we would store it in an X-NEXTCLOUD-COLOR property

ccoenen commented 8 years ago

X-NEXTCLOUD-* is exactly what I would like to prevent when I say "island of usupported fields".

georgehrke commented 8 years ago

Well, but there is no standard for it.

MariusBluem commented 8 years ago

...how does Apple do this? 😁

georgehrke commented 8 years ago

Apple does not have the feature to color certain events.

ccoenen commented 8 years ago

One could try to bring a proposal forward according to this:

https://tools.ietf.org/html/rfc5545#section-8.2.3

   A property is defined by completing the following template.

   Property name:  The name of the property.

   Purpose:  The purpose of the property.  Give a short but clear
      description.

   Value type:  Any of the valid value types for the property value need
      to be specified.  The default value type also needs to be
      specified.

   Property parameters:  Any of the valid property parameters for the
      property MUST be specified.

   Conformance:  The calendar components in which the property can
      appear MUST be specified.

   Description:  Any special notes about the property, how it is to be
      used, etc.

   Format definition:  The ABNF for the property definition needs to be
      specified.

   Example(s):  One or more examples of instances of the property need
      to be specified.

I would also not go with COLOR as a property name, it does not reflect the fact that this is a very optional field. It should, for example, not storw the default color of the calendar in my opinion (if it did, you could never easily change the calendar color in the future without touching every single event). Using this property is - as stated in the title - more suitable to draw attention. I propose something like DEFAULT-COLOR-OVERRIDE or HIGHLIGHT-COLOR or something like that.

purpose would be "optional override to draw attention to a specific event or todo in a calendar. takes precedence over the calendars default color.

Value Type - probably just TEXT

Property Parameters - hex codes starting with # or named css colors (or do we need something else?)

ccoenen commented 8 years ago

There's CATEGORIES already, maybe supporting categories (and adding display rules to a category) would help the OP as well? This would stay well within the standard without the need for customisations.

example "oh hey, this needs to stand out for a reason" - the reason being that this is a familiy event. Add the category family. BOOM Family styling applied. Event stands out from the rest.

ccoenen commented 8 years ago

Upside: Thunderbird / Calendara already supports categories and it will add a tiny color-code to the end of the event (the green things called "Urlaub" also have the category "Urlaub" and the blue appointment on 2016-09-20 has the category "Besprechung", everything else has no category.

categories

georgehrke commented 7 years ago

RFC 7986 introduces COLOR. We should use that property :) https://tools.ietf.org/html/rfc7986#section-5.9

aluxnimm commented 7 years ago

We now have experimental support for the new COLOR attribute from RFC 7986 and can map the Outlook category color to the COLOR attribute in Outlook CalDavSynchronizer

Since this is also supported in DAVdroid, see https://forums.bitfire.at/topic/1058/single-event-colors and some Android calendar apps it would be really useful to be able to show/edit the COLOR in the Nextcloud calendar app for a seamless Outlook and Android integration!

georgehrke commented 7 years ago

Absolutely.

I'm still not sure how to map the colors from our rgb color picker to the list of css3 color names yet though. Any suggestions?

tcitworld commented 7 years ago

Since the list of possible colors is quite small, we can show a standard select element instead.

georgehrke commented 7 years ago

I already see people opening issues why we didn't use the same (full-featured) color-picker as in the left sidebar 🙈

aluxnimm commented 7 years ago

Not that small, around 150 possible colors. I needed to map those to the around 25 possible Outlook category colors and used some nearest color metric but not in the RGB space, since this is rather useless.

juliushaertl commented 6 years ago

This might be helpful for finding the nearest color value: https://stackoverflow.com/questions/17175664/get-the-closest-color-name-depending-on-an-hex-color/17176082#17176082

sachaz commented 6 years ago

Still interested by this feature ;)

georgehrke commented 6 years ago

@sachaz Please use the Github Reactions feature instead of commenting +1, 👍 etc. These kinds of comments just unnecessarily notify everyone subscribed to this issue. Thx! :)

jookk commented 6 years ago

Really needed +1

DiGGeR2 commented 6 years ago

Really needed too +1

sachaz commented 6 years ago

facebook "like" style ? ;)

ediazcomellas commented 6 years ago

Anyone willing to take this issue? I will double the bounty if it is done by end of april 2018.

tlehmann7 commented 5 years ago

Is that still active?

ccoenen commented 5 years ago

If someone wants to step forward with a pull request, I bet it would get merged.

DiGGeR2 commented 5 years ago

YesLe 26 sept. 2018 10:59, tlehmann7 notifications@github.com a écrit :Is that still active?

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

UralZima commented 5 years ago

I also need this feature. Please implement it, it is very useful! I want to create a moon calendar and have different colors for each moonday for easier planning your events according to moonphases and moondays.

georgehrke commented 5 years ago

Everyone, as I mentioned above already, please please use the Github Reactions feature instead of commenting +1, 👍 etc. These kinds of comments just unnecessarily notify everyone subscribed to this issue.

If this doesn't stop i will have to lock this issue. Thx.

sachaz commented 5 years ago

Hi I can add 50€ to this feature too if it can motivate some folk

tcitworld commented 5 years ago

Next versions of Safari on MacOS and iOS will include color pickers therefore we may be able to just rely on standard color pickers.

ccoenen commented 5 years ago

The picker seems not to be the issue, but the fact that you would need to convert this to one of the CSS3 color names:

The value is a case-insensitive color name taken from the CSS3 set of names, defined in Section 4.3 of [W3C.REC-css3-color-20110607].

As far as I know the browser integrated color pickers return rgb style strings as value. (Strings like #FF0000) which would not work (well, it may work, but it would be against the spec). Instead a name like red would be required. This adds the complexity of mapping one of 16.7 Million combinations to one of ~150 color keywords AND explaining to a user why it's a slightly different shade of fuchsia than his color picker intended it to be.

The cite is from https://tools.ietf.org/html/rfc7986#section-5.9 The referenced w3c standard is this section here: https://www.w3.org/TR/2011/REC-css3-color-20110607/#svg-color

aluxnimm commented 5 years ago

Actually there exists an errata to that RFC which allows rgb values! e.g. COLOR:rgb(61\,211\,68) https://www.rfc-editor.org/errata_search.php?rfc=7986

ccoenen commented 5 years ago

I'm not sure about the errata system in IETF RFCs, but that one is in "reported" state. I don't believe this is wise to build on this, yet.

aluxnimm commented 5 years ago

I could add support for it in Outlook CalDav Synchronizer if Nextcloud uses it, but DAVx5 also only supports CSS3 names atm. I can ask in CalConnect mailing lists, if other vendors support it or plan to do so. We have similar discussions about formatted description property and some vendors like Google calendar just add HTML tags to the standard description property which should be plain-text according to RFC.

PetrVladimirov commented 5 years ago

Hi, is it possible to add an Option, to change a meetings color in the calendar? (it is only defined by calendar-source colour as at the moment) ...sometimes there may be an important meeting and i want to make it stand out by red color for example...(without changing calendar). i think there should some color/Highlight function? any suggestions? maybe tags+a searchbox (filter) could also be great... #ux

There is a $50 open bounty on this issue. Add to the bounty at Bountysource.

I've added $10 more

Doriphore commented 5 years ago

i agree with this demand really important for organisation, I just can offer a smile ;)

brycefisher commented 5 years ago

I'm potentially interested in contributing PRs for this feature. Is the COLOR field issue sufficiently clear for a PR to be considered?

devillemereuil commented 4 years ago

@brycefisher Maybe a good strategy would be some code updating the COLOR field according to the landing CATEGORY support, see #1540. Well, at least, linking those two, as the UI for categories will be there anyway.

georgehrke commented 4 years ago

Please don't mix up CATEGORY and COLOR, they are two fundamentally different properties.

ccoenen commented 4 years ago

also #1540 suggests that at a later stage some kind of visual element for categories might be added. A Category -> Color automation is probably not a good idea:

I think thunderbird's approach (screenshot) is much more sane than tying CATEGORIES into COLOR.

devillemereuil commented 4 years ago

I see. My reasoning was that some clients (e.g. all Android clients, as far as I know) don't support CATEGORY but do support COLOR (at least some of them) and linking the two might help having a way to get the information transmitted (at least in a visual way) across clients.

It seems it opens a bigger can of worm than I anticipated... Oh well, it was a mere suggestion, sorry if it was a dumb one.

georgehrke commented 4 years ago

https://www.npmjs.com/package/css-color-names https://www.npmjs.com/package/closest-css-color ?

vince-from-nice commented 4 years ago

I've added 15$ to the bounty but the total amount displayed on Github is not (yet) updated.

juliushaertl commented 4 years ago

Awesome. Yes, the bountysource github integration is broken since quite some time. I've updated the title manually for now.

szaimen commented 4 years ago

🎉

vince-from-nice commented 4 years ago

Georg, please claim your bounty :)

sachaz commented 4 years ago

I want to contribute to the bounty, how ?

vince-from-nice commented 4 years ago

There is a link to bountysource on the top of that page.