It is currently September 16th, 2024, 8:40 pm

Chameleon to change skin color based on wallpaper engine wallpaper and not windows background

Get help with creating, editing & fixing problems with skins
Taher
Posts: 10
Joined: June 27th, 2024, 7:10 am

Chameleon to change skin color based on wallpaper engine wallpaper and not windows background

Post by Taher »

I am using wallpaper engine to set a slideshow of live and static wallpapers and due to that I have kept a solid color background in windows personalization. I am also using a rainmeter skin mond and chameleon plugin to dynamically change colors of the skin based on the wallpapers in wallpaper engine playlist but the chameleon plugin picks and sets colors based on the windows solid background. How do I let chameleon change color of rainmeter skin based on wallpaper engine wallpapers? Any help? Thank you in advance !

Here's my file code:

Code: Select all

[Rainmeter]
Update=1000
Author=Connect-R
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"][!Refresh] 
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 0.5 ? 0.5 : #Scale#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 0.5 ? 0.5 : #Scale#-#ScrollMouseIncrement#)"][!Refresh] 
LeftMouseDoubleClickAction=!ToggleConfig "Mond\Settings" "Settings.ini"

[Variables]
@include=#@#Variables.inc
@include2=#@#Language\#Language#.inc
Scale=1.16

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

[Light1]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Light1
OnChangeAction=[!UpdateMeasureGroup Luminance]

[Dark1]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Dark1
OnChangeAction=[!UpdateMeasureGroup Luminance]

[ChameleonLuminance]
Measure=Plugin
Group=Luminance
Plugin=Chameleon
Type=Desktop
UpdateDivider=-1
CropX=#CURRENTCONFIGX#
CropY=#CURRENTCONFIGY#
CropW=#CURRENTCONFIGWIDTH#
CropH=#CURRENTCONFIGHEIGHT#
DynamicVariables=1

[Luminance]
Measure=Plugin
Group=Luminance
Plugin=Chameleon
Parent=ChameleonLuminance
Format=Dec
Color=Luminance
UpdateDivider=-1
IfCondition=Luminance <= 0.5
IfTrueAction=[!SetVariable Color1 "[Light1]"][!UpdateMeter *][!Redraw]
IfFalseAction=[!SetVariable Color1 "[Dark1]"][!UpdateMeter *][!Redraw]
IfConditionMode=1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureTime]
Measure=Time
Format="%#Format#:%M"

[MeasureAmPm]
Measure=Time
Format="%p"

[MeasureDay]
Measure=Time
Format=%A
Substitute=#Date#

[MeasureDate]
Measure=Time
Format=%d  %B  %Y
Substitute=#Date#

;-------------------------------------------------------------
;-------------------------------------------------------------

[Meter24hClock]
Meter=String
MeasureName=MeasureTime
StringAlign=Center
StringCase=Upper
FontFace=Quicksand
FontColor=#Color1#
FontSize=(30*#Scale#)
X=(325*#Scale#)
Y=(120*#Scale#)
Text="- %1 -"
AntiAlias=1
Hidden=#Hidden#
DynamicVariables=1

[Meter12hClock]
Meter=String
MeasureName=MeasureTime
MeasureName2=MeasureAmPm
StringAlign=Center
StringCase=Upper
FontFace=Quicksand
FontColor=#TextColor#
FontSize=(14*#Scale#)
X=(540*#Scale#)
Y=(320*#Scale#)
Text="- %1 %2 -"
AntiAlias=1
Hidden=#Hidden2#
DynamicVariables=1

[MeterDay]
Meter=String
MeasureName=MeasureDay
StringAlign=Center
StringCase=Upper
FontFace=Anurati
FontColor=#Color1#
FontSize=(40*#Scale#)
X=(340*#Scale#)
Y=(0*#Scale#)
Text="%1"
InlineSetting=CharacterSpacing | 10 | 10
AntiAlias=1
DynamicVariables=1
#TextColor#

[MeterDate]
Meter=String
MeasureName=MeasureDate
StringAlign=Center
StringCase=Upper
FontFace=Quicksand
FontColor=#Color1#
FontSize=(24*#Scale#)
X=(340*#Scale#)
Y=(75*#Scale#)
Text="%1"
AntiAlias=1
DynamicVariables=1
User avatar
Yincognito
Rainmeter Sage
Posts: 8153
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Chameleon to change skin color based on wallpaper engine wallpaper and not windows background

Post by Yincognito »

Taher wrote: June 27th, 2024, 7:37 am How do I let chameleon change color of rainmeter skin based on wallpaper engine wallpapers?
Not sure how much this would help, since I don't use the plugin on a regular basis, but the general idea would be to sample colors from a file via Type=File, instead of Type=Desktop in its measure, see here:
https://github.com/socks-the-fox/chameleon

Now, while this would probably work for the image file equivalents from your Wallpaper Engine wallpapers, I doubt it would work for videos, if by any chance you use that too in Wallpaper Engine.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Taher
Posts: 10
Joined: June 27th, 2024, 7:10 am

Re: Chameleon to change skin color based on wallpaper engine wallpaper and not windows background

Post by Taher »

Yincognito wrote: June 27th, 2024, 12:15 pm Not sure how much this would help, since I don't use the plugin on a regular basis, but the general idea would be to sample colors from a file via Type=File, instead of Type=Desktop in its measure, see here:
https://github.com/socks-the-fox/chameleon

Now, while this would probably work for the image file equivalents from your Wallpaper Engine wallpapers, I doubt it would work for videos, if by any chance you use that too in Wallpaper Engine.
can you show with an example for better understanding how to use Type= File
User avatar
Yincognito
Rainmeter Sage
Posts: 8153
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Chameleon to change skin color based on wallpaper engine wallpaper and not windows background

Post by Yincognito »

Taher wrote: June 27th, 2024, 3:24 pm can you show with an example for better understanding how to use Type= File
How hard can it be? :confused:

In the [ChameleonDesktop] and [ChameleonLuminance] measures from your posted code, just replace:

Code: Select all

Type=Desktop
with:

Code: Select all

Type=File
Path=FullPathToYourImageFileHere
and obviously use the desired path in the corresponding options.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Taher
Posts: 10
Joined: June 27th, 2024, 7:10 am

Re: Chameleon to change skin color based on wallpaper engine wallpaper and not windows background

Post by Taher »

Yincognito wrote: June 27th, 2024, 5:01 pm How hard can it be? :confused:

In the [ChameleonDesktop] and [ChameleonLuminance] measures from your posted code, just replace:

Code: Select all

Type=Desktop
with:

Code: Select all

Type=File
Path=FullPathToYourImageFileHere
and obviously use the desired path in the corresponding options.
But then this solution is for a single wallpaper file while I am using a playlist of static and live wallpapers so how do I mention the path for other wallpapers?
User avatar
Yincognito
Rainmeter Sage
Posts: 8153
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Chameleon to change skin color based on wallpaper engine wallpaper and not windows background

Post by Yincognito »

Taher wrote: June 27th, 2024, 5:10 pm But then this solution is for a single wallpaper file while I am using a playlist of static and live wallpapers so how do I mention the path for other wallpapers?
Live wallpapers will almost certainly not work with the Chameleon plugin, since, just like Rainmeter itself, it only supports static image files, even in the case of GIFs only the first frame will be taken into account or be displayed.

When it comes static images, you could use the Wallpaper Engine's command line controls in some RunCommand measures to either load the list, change the wallpaper at constant time intervals, or get the wallpaper path to STDOUT (aka the Standard Output, or the command prompt window). Then, in the FinishAction of the RunCommand measure that gets the wallpaper path, use the !SetOption bang to assign the value of that RunCommand measure to your [ChameleonDesktop] and [ChameleonLuminance] measures' Path option, update those measures, update the meters and redraw the skin.

That being said, the above approach might be slightly convoluted and not easily understandable for a beginner in either Wallpaper Engine or Rainmeter, so, if you don't care much about the live wallpapers or the transitions and effects on the static ones (if any), you could forget about Wallpaper Engine and just use Rainmeter's own !SetWallpaper bang to change wallpapers based on a "list" of numbered path variables in your skin. Obviously, just like above, when changing the wallpaper, you'll need to also use !SetOption to set the Path option in your Chameleon measures to the variable holding that path, update measures, meters and redraw.

P.S. I don't currently have or use Wallpaper Engine, so I can't test its command line controls, that part - if chosen and nobody else is advising on that - is up to you. For the Rainmeter part, depending on your choice, we can however help, if needed.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Taher
Posts: 10
Joined: June 27th, 2024, 7:10 am

Re: Chameleon to change skin color based on wallpaper engine wallpaper and not windows background

Post by Taher »

Yincognito wrote: June 27th, 2024, 6:43 pm Live wallpapers will almost certainly not work with the Chameleon plugin, since, just like Rainmeter itself, it only supports static image files, even in the case of GIFs only the first frame will be taken into account or be displayed.

When it comes static images, you could use the Wallpaper Engine's command line controls in some RunCommand measures to either load the list, change the wallpaper at constant time intervals, or get the wallpaper path to STDOUT (aka the Standard Output, or the command prompt window). Then, in the FinishAction of the RunCommand measure that gets the wallpaper path, use the !SetOption bang to assign the value of that RunCommand measure to your [ChameleonDesktop] and [ChameleonLuminance] measures' Path option, update those measures, update the meters and redraw the skin.

That being said, the above approach might be slightly convoluted and not easily understandable for a beginner in either Wallpaper Engine or Rainmeter, so, if you don't care much about the live wallpapers or the transitions and effects on the static ones (if any), you could forget about Wallpaper Engine and just use Rainmeter's own !SetWallpaper bang to change wallpapers based on a "list" of numbered path variables in your skin. Obviously, just like above, when changing the wallpaper, you'll need to also use !SetOption to set the Path option in your Chameleon measures to the variable holding that path, update measures, meters and redraw.

P.S. I don't currently have or use Wallpaper Engine, so I can't test its command line controls, that part - if chosen and nobody else is advising on that - is up to you. For the Rainmeter part, depending on your choice, we can however help, if needed.
The above explanation seems good but how to implement it ? went through the command hyperlinks but could not understand how to implement it with my file?

Could you show it with a demo using my above file code? like what to put where and how to get it working?
User avatar
Yincognito
Rainmeter Sage
Posts: 8153
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Chameleon to change skin color based on wallpaper engine wallpaper and not windows background

Post by Yincognito »

Taher wrote: June 28th, 2024, 6:02 am The above explanation seems good but how to implement it ? went through the command hyperlinks but could not understand how to implement it with my file?

Could you show it with a demo using my above file code? like what to put where and how to get it working?
I won't write your skin, if that's what you mean, it's not what this forum is about. Helping you write it, that's another matter, we're all for it. ;-)

If it's just about changing some image wallpapers, I would suggest, given that it's easier and the fact that I don't have Wallpaper Engine to test, to try the !SetWallpaper part. A first step would be to declare and assign the paths for the images in your list to some variables that you'd name Wallpaper0, Wallpaper1, Wallpaper2, and so on, in the [Variables] section of your skin. What do you think?
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Taher
Posts: 10
Joined: June 27th, 2024, 7:10 am

Re: Chameleon to change skin color based on wallpaper engine wallpaper and not windows background

Post by Taher »

I don't mean to write it for me I am just asking that what will go where as it was difficult to understand so as a result I was asking for a demo code or something where it becomes clear what goes where and how to go step by step. Btw Thanks for your help :great:
User avatar
Yincognito
Rainmeter Sage
Posts: 8153
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Chameleon to change skin color based on wallpaper engine wallpaper and not windows background

Post by Yincognito »

Taher wrote: June 28th, 2024, 5:51 pm I don't mean to write it for me I am just asking that what will go where as it was difficult to understand so as a result I was asking for a demo code or something where it becomes clear what goes where and how to go step by step. Btw Thanks for your help :great:
Well, I just laid out the 1st step from the 2nd (and easiest) choice, explained what goes where, yet didn't see any implementation of it, you know. :confused:

If you want to understand what goes where in a Rainmeter skin, it's easy, the manual has a demo code for almost everything you can use in such a skin, you just have to adapt it to your needs. For example, if you're by any chance interested in the 1st choice, did you check the RunCommand demo code at the bottom of its page?
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth