MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Calendar Color

    Scheduled Pinned Locked Moved Solved Troubleshooting
    27 Posts 12 Posters 19.7k Views 13 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      billp100
      last edited by

      Got it! thank you for your help

      1 Reply Last reply Reply Quote 0
      • Mitch1138M Offline
        Mitch1138
        last edited by yawns

        Great discussion. I have also added the options to add color the my two calendars, without success. Does anyone know if color is active in the current code? Here is my config setup:

        {
            module: 'calendar',
            header: 'My Calendar',
            position: 'top_left',
            config: {
            	colored:  true,
        	calendars: [
        		{
        		symbol: 'calendar ',
        		url: 'https://calendar.google.com/calendar/ical/.../basic.ics',
        		color: '#f70000'
        		},
                       	 {
        		symbol: 'calendar-o ',
        		url: 'https://calendar.google.com/calendar/ical/.../basic.ics'
        		color: '#04f448'
                     		},
                            ]
                    }
        },
        

        Many thanks

        strawberry 3.141S 1 Reply Last reply Reply Quote 0
        • strawberry 3.141S Offline
          strawberry 3.141 Project Sponsor Module Developer @Mitch1138
          last edited by

          @Mitch1138 its still in the develop branch only

          Please create a github issue if you need help, so I can keep track

          R 1 Reply Last reply Reply Quote 0
          • Mitch1138M Offline
            Mitch1138
            last edited by

            That was fast, thanks very much. How can you tell when it is released?

            Thanks

            A 1 Reply Last reply Reply Quote 0
            • A Offline
              Aries1984 Module Developer @Mitch1138
              last edited by

              quick question on this issue…it the function already released? I can’t get it to work :( My config is:

               {
                          module: "calendar",
                          colored: true,
                          header: "Termine",
                          position: "top_left",
                          config: {
                              displaySymbol: true,
                              timeFormat: "absolute",
                              getRelative: "0",
                              urgency: "0",
                              dateFormat: "DD.MM HH:mm",
                              FullDayEventDateFormat: "DD.MM",
                              fetchInterval: "5000",
                              fade: false,
                              calendars: [
                                  {
                                      symbol: "mars",
                                      color: '#f70000',
                                       url: "https://calendar.google.com/calendar...",
                                  },
                                  {
                                      symbol: "venus",
                                      color: '#f70000',
                                      url: "https://calendar.google.com/calendar...",
                                  },
                                  {
                                      symbol: "clock",
                                      color: '#f70000',
                                      url: "https://calendar.google.com/calendar...",
                                  },
                                  {
                                      symbol: "globe",
                                      color: '#f70000',                        
                                      url: "https://calendar.google.com/calendar...",
                                  },
                                  {
                                      symbol: "cocktail",
                                      color: '#f70000',
                                      url: "https://calendar.google.com/calendar...",
                                  }
                              ]
                          }
                      },
              
              1 Reply Last reply Reply Quote 0
              • L Offline
                LeFreak76
                last edited by

                Hello Aries,
                have you found a solution for this problem? I have started my Mirror Build today and achieved a lot of good working things. But the calendars are driving me nuts. First test with MMM-MyCalendar failed because of incorect displayed times (11 or 25 minutes off). Never the less that one had colors. Now i switched back to the “default” calendar, and at least the times are properly shown (despite the fact the the absolute or relative Parameters are doing nothing…). Unfortunately it is not possible to change the colors of the different url’s.
                So please drop me a line if you found a solution to it. Or if not “Same problem here +1”

                Thanks a lot
                LeFreak76 from Hamburg

                1 Reply Last reply Reply Quote 0
                • H Offline
                  hockey2112
                  last edited by

                  @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.

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    rally @strawberry 3.141
                    last edited by

                    @strawberry-3-141 What does that mean?
                    It’s not available?

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      Mrc
                      last edited by

                      Go to folder MagicMirror/modules/default/calendar , edit calendar.js , change values colored and coloredSymbolOnly to “true”

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @Mrc
                        last edited by sdetweil

                        @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
                        }
                        }

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • R Offline
                          RJDaPirate
                          last edited by sdetweil

                          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'
                          					}	
                          				]
                          			}
                          		},
                          
                          S 1 Reply Last reply Reply Quote 0
                          • S Offline
                            sdetweil @RJDaPirate
                            last edited by

                            @RJDaPirate

                            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

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            R 1 Reply Last reply Reply Quote 0
                            • R Offline
                              RJDaPirate @sdetweil
                              last edited by

                              @sdetweil I deleted the personal settings within the urls. They are all different in the real config.js file.

                              S 1 Reply Last reply Reply Quote 0
                              • S Offline
                                sdetweil @RJDaPirate
                                last edited by

                                @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");
                                	},
                                

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                R 1 Reply Last reply Reply Quote 0
                                • R Offline
                                  RJDaPirate @sdetweil
                                  last edited by

                                  @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?

                                  S 1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    sdetweil @RJDaPirate
                                    last edited by sdetweil

                                    @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 section

                                    then it looks up color value by url…

                                    if not found it return #fff as the color…

                                    u have 6 digit color values…

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    R 1 Reply Last reply Reply Quote 0
                                    • R Offline
                                      RJDaPirate @sdetweil
                                      last edited by

                                      @sdetweil Understand you did not “edit”. Do not understand what I have done wrong? Cannot find examples of Calendar Module Config.js with seperate colors for different url (google) calendars. Is there a knowledge document you’d recommend I read thru that covers those config: { colored:…

                                      S 1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        sdetweil @RJDaPirate
                                        last edited by

                                        @RJDaPirate I wasn’t aware of color support myself til you mentioned it.

                                        the online doc is all I am aware of

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        1 Reply Last reply Reply Quote 0
                                        • R Offline
                                          RJDaPirate
                                          last edited by

                                          @sdetweil , The lack of a “proper” symbol was my undoing.

                                          1 Reply Last reply Reply Quote 0
                                          • P Offline
                                            pastormingle
                                            last edited by

                                            how do you change the schedule time color and font? Mine seems to be gray even after sending the fade to false.

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy