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

Add Option for Background Color and Font Colors for each calendar #155

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

Conversation

skilly00
Copy link

@skilly00 skilly00 commented Oct 5, 2024

Small bit of code to add background color for each calendar if desired. Also readme was updated to explain and add function for legend which was missing.

Added info about showLegend and  calendar event background
added calendar var for Background Color on events
@whittssg
Copy link

whittssg commented Oct 7, 2024

@skilly00 Should an option be added for font color at the same time if this pull is allowing for background color change? I know card mod would work but might be easier adding another option. If the user adds a really light background the default font color wont show well.

Added 2 new Variables for Calendars on Events.  primary text + secondary text colors
Add CSS Map to event Title and --primary-text-color
@skilly00
Copy link
Author

skilly00 commented Oct 8, 2024

@skilly00 Should an option be added for font color at the same time if this pull is allowing for background color change? I know card mod would work but might be easier adding another option. If the user adds a really light background the default font color wont show well.

I added that per your request I have tested it with Firefox and Safari and all changes made work.

@skilly00 skilly00 changed the title Add Option for Background Color for each calendar. Add Option for Background Color and Font Colors for each calendar Oct 9, 2024
@FamousWolf
Copy link
Owner

I'd rather keep the number of options, especially for styling, limited where possible. You can already style events for each calendar differently using card_mod, as each event has a data-entity attribute with the calendar entity. For example:

card_mod:
  style: |
    .container .day .events .event[data-entity="calendar.my_calendar"] .title {
      color: #ff0000;
    }

This will change the title color for events from entity calendar.my_calendar to red.

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.

3 participants