• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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 16.5k 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.
  • R Offline
    RJDaPirate
    last edited by sdetweil Sep 13, 2020, 1:06 AM Sep 13, 2020, 1:04 AM

    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 Sep 13, 2020, 1:12 AM Reply Quote 0
    • S Offline
      sdetweil @RJDaPirate
      last edited by Sep 13, 2020, 1:12 AM

      @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 Sep 13, 2020, 1:13 AM Reply Quote 0
      • R Offline
        RJDaPirate @sdetweil
        last edited by Sep 13, 2020, 1:13 AM

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

        S 1 Reply Last reply Sep 13, 2020, 1:17 AM Reply Quote 0
        • S Offline
          sdetweil @RJDaPirate
          last edited by Sep 13, 2020, 1:17 AM

          @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 Sep 13, 2020, 1:22 AM Reply Quote 0
          • R Offline
            RJDaPirate @sdetweil
            last edited by Sep 13, 2020, 1:22 AM

            @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 Sep 13, 2020, 1:26 AM Reply Quote 0
            • S Offline
              sdetweil @RJDaPirate
              last edited by sdetweil Sep 13, 2020, 1:28 AM Sep 13, 2020, 1:26 AM

              @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 Sep 13, 2020, 1:39 AM Reply Quote 0
              • R Offline
                RJDaPirate @sdetweil
                last edited by Sep 13, 2020, 1:39 AM

                @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 Sep 13, 2020, 2:02 AM Reply Quote 0
                • S Offline
                  sdetweil @RJDaPirate
                  last edited by Sep 13, 2020, 2:02 AM

                  @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 Sep 16, 2020, 10:32 PM

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

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      pastormingle
                      last edited by Sep 7, 2021, 8:04 PM

                      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
                      • 1
                      • 2
                      • 3
                      • 3 / 3
                      • 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