Read the statement by Michael Teeuw here.
Calendar Color
-
@LeFreak76 , I found a solution that worked for me: https://github.com/MichMich/MagicMirror/tree/develop/modules/default/calendar#calendar-configuration
Basically, you need to add colored and coloredSymbolOnly settings/values. Then you can add the color setting with the hex code for each calendar.
-
@strawberry-3-141 What does that mean?
It’s not available? -
Go to folder MagicMirror/modules/default/calendar , edit calendar.js , change values colored and coloredSymbolOnly to “true”
-
@Mrc do NOT edit the module source files to change configuration.
put the settings in the config section for that. module in config.js
{ module:'calendar', config:{ colored:true, coloredSymbolsOnly:true } }
-
Any one know why all of the calendar entries are being assigned Mom’s color instead of their own?
module: "calendar", header: "Family Schedule", position: "top_center", config: { colored: true, calendars: [ { symbol: "calendar-check", url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics" }, { symbol: "Dad's Calender", url: "https://calendar.google.com/calendar/ical/basic.ics", color: '#6600CC' }, { symbol: "Mom's Calender", url: "https://calendar.google.com/calendar/ical/basic.ics", color: '#ff0000' }, { Symbol: "A's Calender", url: "https://calendar.google.com/calendar/ical/basic.ics", color: '#00ff00' }, { symbol: "J's Calender", url: "https://calendar.google.com/calendar/ical/basic.ics", color: '#40E0D0' }, { symbol: "L's Calender", url: "https://calendar.google.com/calendar/basic.ics", color: '#ffd700' } ] } },
-
the code looks up the color using the url as a key…
all of your urls are the same so you will get results based on the url, where the name is stored last. M is higher than any other string, so the url will match that in the hash lookup
-
@sdetweil I deleted the personal settings within the urls. They are all different in the real config.js file.
-
@RJDaPirate the code does this
if (this.config.colored && !this.config.coloredSymbolOnly) { eventWrapper.style.cssText = "color:" + this.colorForUrl(event.url); }
colorForUrl: function (url) { return this.getCalendarProperty(url, "color", "#fff"); },
-
@sdetweil This is not visible in the config.js file. Earlier in the thread you instructed another user not the change settings in source instead of the config.js. Where are the setting you highlighted?
-
@RJDaPirate i am just showing the code that uses the settings from config.js… not changing it…
this.config.colored
u have colored: true, in config.js calendar config sectionthen it looks up color value by url…
if not found it return #fff as the color…
u have 6 digit color values…