Skip to content
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

Added support for ICS COLOR property (#188) #421

Merged
merged 4 commits into from
Jan 19, 2025

Conversation

Aga-C
Copy link
Member

@Aga-C Aga-C commented Jan 15, 2025

What is it?

  • Bugfix
  • Feature
  • Codebase improvement

Description of the changes in your PR

  • Added support for importing and exporting COLOR property.
  • Because COLOR uses a color palette (according to RFC 7986), I've added an extra property X-FOSSIFY-EVENT-COLOR to store the exact color.
  • If a color isn't from the predefined palette, the closest color is chosen (found as a color with minimal Euclidean distance).
  • X-FOSSIFY-EVENT-COLOR is stored directly after COLOR, so it will always overwrite approximated color from COLOR.
  • COLOR is not exported if event color is the same as event type color.

Fixes the following issue(s)

Acknowledgement

@naveensingh
Copy link
Member

naveensingh commented Jan 19, 2025

Just made some code style changes, everything works and looks good!

The getDisplayColorFromColor() function should probably be removed or should only be used in UI because currently we are exporting modified event colors.

Thanks!

@naveensingh naveensingh merged commit 390477c into FossifyOrg:master Jan 19, 2025
2 of 4 checks passed
@Aga-C Aga-C deleted the ics-color-field branch January 19, 2025 18:14
naveensingh added a commit that referenced this pull request Jan 26, 2025
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.

Implementing color-data to ICS import / export for events (part of RFC 7986)
2 participants