Skip to content

Add rfc7986 color support for VEVENT objects #327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ghsioux
Copy link

@ghsioux ghsioux commented Feb 21, 2025

This pull request adds color support for VEVENT objects as introduced by RFC 7986.

Implements #328.

First commit 1d5c408

  • Changes the color system from hex notation to HTML color names as specified in the RFC.
  • Uses a pre-built mapping for event text color based on background color luminance.
  • Breaking change: Users will need to update their settings.php file to use color names.
    • The same color picker is now used for both calendar objects and VEVENT objects.
    • Users can refer to web/config/default.settings.php for guidance.
    • This change improves interoperability with other RFC 7986-compliant apps, such as Etar on Android, which also use color names.

Second commit f99fd6e

  • Adds support for reading the "COLOR" field from VEVENT objects retrieved via the CalDav server.
  • Use case:
    1. A colored VEVENT object is created in another app (e.g., Etar on Android).
    2. The event color is correctly displayed in Agendav.

Third commit 86569d9

  • Adds support for writing the "COLOR" field when creating or modifying VEVENT objects in the CalDav server.
  • Use case:
    1. A VEVENT object is created or modified in Agendav, and the user selects a custom color via the color picker.
    2. When saving the VEVENT object, the COLOR field is written and sent along with other VEVENT fields to the CalDav server.
    3. Other RFC 7986-compliant apps can now correctly display the event color.

Fourth commit 656bdc4

  • Adds a reset button to remove custom colors for VEVENT objects.
  • Behavior when resetting the color and saving the VEVENT object:
    • The COLOR field is removed from the remote CalDav server.
    • The calendar color is used as the default to display the VEVENT object in Agendav.

@vincent-k
Copy link

Love it! Working flawlessly so far, hope to see this merged soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants