It is currently October 15th, 2019, 9:49 am

Plugin: Chameleon

Plugins and Addons popular with the Community
User avatar
Axinoe
Posts: 12
Joined: April 27th, 2018, 10:52 pm

Re: Plugin: Chameleon

Axinoe » July 29th, 2019, 7:05 pm

Is there any way to stop Chameleon (Desktop wallpaper) from trying to read a file that no longer exists?
User avatar
y0himba
Posts: 36
Joined: September 25th, 2016, 3:35 pm
Location: At a desk

Re: Plugin: Chameleon

y0himba » August 29th, 2019, 1:20 am

I am trying to use this in conjunction with Modern Gadgets. DynamicVariables=1 is in each meter in each gadget, yet font color is not changing with my desktop wallpaper. The instructions were confusing to me, as I am an old fart. What am I missing? What do I need to set or edit? Thanks for any help from anyone.
---
Once up a time there was a now playing signature here. Now it is no more. Maybe someone can make a now playing sig gen for Last.fm? :thumbup:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3568
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Plugin: Chameleon

eclectic-tech » August 29th, 2019, 3:41 am

y0himba wrote:
August 29th, 2019, 1:20 am
I am trying to use this in conjunction with Modern Gadgets. DynamicVariables=1 is in each meter in each gadget, yet font color is not changing with my desktop wallpaper. The instructions were confusing to me, as I am an old fart. What am I missing? What do I need to set or edit? Thanks for any help from anyone.
Let me do a bit of testing to see if this can work in Modern Gadgets (raiguard developed a very robust system that may not respond kindly to integrating Chameleon colors)... stay tuned!

Edit:Chameleon can return four colors: Foreground1, Foreground2, Background1, and Background2 which correspond to the main four colors in Modern Gadgets: colorMain, colorDim, colorBg, and colorSubBg.

These measures will replace the default colors and set the style to the four colors returned by Chameleon when you change your desktop wallpaper.

I would recommend making a copy of "#@#StyleSheet.inc" file before making these additions.

Add these measures to the bottom of "#@#StyleSheet.inc".

Code: Select all

[ChameleonDesktop]
Measure=Plugin
Plugin=Chameleon
Type=Desktop

[DesktopFG1]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Foreground1
Format=Dec

[DesktopFG2]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Foreground2
Format=Dec

[DesktopBG1]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Background1
Format=Dec

[DesktopBG2]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Background2
Format=Dec
OnChangeAction=[!WriteKeyValue Variables dcolorMain [DesktopFG1] "#@#Settings\GlobalSettings.ini"][!WriteKeyValue Variables dcolorBg [DesktopBG1] "#@#Settings\GlobalSettings.ini"][!WriteKeyValue Variables dcolorDim [DesktopFG2] "#@#Settings\GlobalSettings.ini"][!WriteKeyValue Variables dcolorSubBg [DesktopBG2] "#@#Settings\GlobalSettings.ini"][!WriteKeyValue Variables colorMain [DesktopFG1] "#@#Settings\GlobalSettings.inc"][!WriteKeyValue Variables colorBg [DesktopBG1] "#@#Settings\GlobalSettings.inc"][!WriteKeyValue Variables colorDim [DesktopFG2] "#@#Settings\GlobalSettings.inc"][!WriteKeyValue Variables colorSubBg [DesktopBG2] "#@#Settings\GlobalSettings.inc"][!RefreshGroup ModernGadgets]
Save the file and refresh all.

Now when you change your wallpaper, the colors will automaticaly change in Modern Gadgets. It can take several seconds for Modern Gadgets to refresh all skins... you can still set colors using the settings skin, but they will be overwritten when you change your wallpaper.
User avatar
y0himba
Posts: 36
Joined: September 25th, 2016, 3:35 pm
Location: At a desk

Re: Plugin: Chameleon

y0himba » August 29th, 2019, 9:52 am

Thank you for the reply. Am I adding this to the StyleSheet.inc in the Modern Gadgets @Resource folder? If so, then there was no change.
---
Once up a time there was a now playing signature here. Now it is no more. Maybe someone can make a now playing sig gen for Last.fm? :thumbup:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3568
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Plugin: Chameleon

eclectic-tech » August 29th, 2019, 11:37 am

y0himba wrote:
August 29th, 2019, 9:52 am
Thank you for the reply. Am I adding this to the StyleSheet.inc in the Modern Gadgets @Resource folder? If so, then there was no change.
Arghhh! :x I was using a previous version of Modern Gadgets which used RainRGB to set colors (sorry about that).

I downloaded the latest (Final?) version 1.6.0, and will need to look deeper into the lua scripts to see what action is needed to apply the Chameleon colors (if possible). Raiguard created a great ColorPicker skin for this suite, so the code I supplied works for the older version, but not the latest.

You may want to ask raiguard directly on the Modern Gadget thread since he is much more familiar with how the skin is setting colors. I will look into possibility of doing this, but it may take me more time than just asking the author. :D
User avatar
y0himba
Posts: 36
Joined: September 25th, 2016, 3:35 pm
Location: At a desk

Re: Plugin: Chameleon

y0himba » August 29th, 2019, 12:23 pm

He will be gone for two years unfortunately. He is doing mission work with his religion. I do appreciate the help!
---
Once up a time there was a now playing signature here. Now it is no more. Maybe someone can make a now playing sig gen for Last.fm? :thumbup:
User avatar
ikarus1969
Posts: 350
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Plugin: Chameleon

ikarus1969 » August 29th, 2019, 12:30 pm

y0himba wrote:
August 29th, 2019, 12:23 pm
He will be gone for two years unfortunately. He is doing mission work with his religion. I do appreciate the help!
raiguard wrote:
August 29th, 2019, 12:25 am
Let me know if you encounter any bugs, I'll only be able to fix them for three weeks before I leave!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3568
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Plugin: Chameleon

eclectic-tech » August 29th, 2019, 12:32 pm

y0himba wrote:
August 29th, 2019, 12:23 pm
He will be gone for two years unfortunately. He is doing mission work with his religion. I do appreciate the help!
He's not gone yet! ;-)

This may give him something to work on before he leaves in a few weeks... :sly:

So far, I only been able to crashed Rainmeter and break Modern Gadgets while trying different methods... :?
But I will persist even if it is just for my own curiosity. :)
User avatar
y0himba
Posts: 36
Joined: September 25th, 2016, 3:35 pm
Location: At a desk

Re: Plugin: Chameleon

y0himba » August 29th, 2019, 12:34 pm

Crashing things is fun! :D I posted asking him if he had any ideas on getting it to work.
---
Once up a time there was a now playing signature here. Now it is no more. Maybe someone can make a now playing sig gen for Last.fm? :thumbup:
User avatar
raiguard
Posts: 642
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Plugin: Chameleon

raiguard » August 30th, 2019, 12:57 am

I went ahead and messed with this, and eclectic-tech's existing code actually does work, you just need to change your background for it to take effect. I made a few additions to change the accent and border colors as well:

Code: Select all

; ==================================================

[ChameleonDesktop]
Measure=Plugin
Plugin=Chameleon
Type=Desktop

[DesktopLight2]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Light2
Format=Dec

[DesktopAverage]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Average
Format=Dec

[DesktopFG1]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Foreground1
Format=Dec

[DesktopFG2]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Foreground2
Format=Dec

[DesktopBG1]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Background1
Format=Dec

[DesktopBG2]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Background2
Format=Dec
OnChangeAction=[!WriteKeyValue Variables colorAccent [DesktopFG2] "#@#Settings\GlobalSettings.inc"][!WriteKeyValue Variables colorBorder [DesktopBG2] "#@#Settings\GlobalSettings.inc"][!WriteKeyValue Variables colorMain [DesktopFG1] "#@#Settings\GlobalSettings.inc"][!WriteKeyValue Variables colorBg [DesktopBG1] "#@#Settings\GlobalSettings.inc"][!WriteKeyValue Variables colorDim [DesktopLight2] "#@#Settings\GlobalSettings.inc"][!WriteKeyValue Variables colorSubBg [DesktopAverage] "#@#Settings\GlobalSettings.inc"][!RefreshGroup ModernGadgets]
DynamicVariables=1
I would also recommend not putting this in the StyleSheet, but at the bottom of the [Variables] section of one of the skins you're using. This will prevent the skins all being refreshed multiple times.

I got pretty passable results with the above code:

Image
Image
Image

Whenever I release a patch, just drop that code into whatever gadget you want again, change your background, and it should work!
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017