It is currently March 28th, 2024, 10:07 am

Plugin: Chameleon

Plugins and Addons popular with the Community
Flayre1
Posts: 12
Joined: June 26th, 2016, 10:41 pm

Re: Plugin: Chameleon

Post by Flayre1 »

Hey Socks,
Thanks for the tip. Unfortunately it's made no change on the skin. I've been trying it in Frost as well and I've had a similar issue. Both seem to only be going white regardless of the desktop, but DINAJ is working perfectly.
Any other thoughts of what could be causing it?
User avatar
Socks the Fox
Posts: 104
Joined: August 25th, 2015, 6:40 pm
Contact:

Re: Plugin: Chameleon

Post by Socks the Fox »

Unfortunately I am away from my computer for the next couple of weeks so I can't do much troubleshooting right now, sorry!
Flayre1
Posts: 12
Joined: June 26th, 2016, 10:41 pm

Re: Plugin: Chameleon

Post by Flayre1 »

Hey Socks,
Sorry I didn't reply last time. I've just gotten back from a holiday today so I am finally with internet.
I was wondering if you have had any other thoughts on the issues i have been having with Circuitous at all?
Thanks, and sorry to be a pain!
User avatar
Socks the Fox
Posts: 104
Joined: August 25th, 2015, 6:40 pm
Contact:

Re: Plugin: Chameleon

Post by Socks the Fox »

Could you post a download for what you have so far? It'd make it a lot easier for me to say exactly "in this file, that needs to be fixed."

Also I just got back from holiday myself so don't worry about it :3
Flayre1
Posts: 12
Joined: June 26th, 2016, 10:41 pm

Re: Plugin: Chameleon

Post by Flayre1 »

Here's my current setup for the skin.
I hope this helps! Thank you for being so helpful!
Last edited by Flayre1 on August 20th, 2016, 8:30 am, edited 1 time in total.
User avatar
Socks the Fox
Posts: 104
Joined: August 25th, 2015, 6:40 pm
Contact:

Re: Plugin: Chameleon

Post by Socks the Fox »

I took a look through the skin, and it looks like you're gonna need to modify @Resources/Styles/common.inc and add DynamicVariables=1 to any of those styles with colors you want to change. Otherwise it'll only grab the color once when Rainmeter loads the skin (and since Chameleon hasn't had a chance to sample the desktop the skin is sitting on, it just tosses out the defaults). If you right-click and refresh the skin you should notice it updating to the correct color. For what you have so far, I added it to [mainTextCommon] and it started working as expected.

It's annoying that Rainmeter doesn't automatically update these variables, and it gets really easy to lose track of where that DynamicVariables needs to be included, but at the same time it drastically cuts down processing time for styles that don't change which is the more common case for the most part.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin: Chameleon

Post by jsmorley »

Socks the Fox wrote: It's annoying that Rainmeter doesn't automatically update these variables, and it gets really easy to lose track of where that DynamicVariables needs to be included, but at the same time it drastically cuts down processing time for styles that don't change which is the more common case for the most part.
Yes, when we looked at this at the time that dynamic variables even became possible (they were not for a very long time) it was decided that on balance, when taken in the aggregate, more resources where used in unneeded checking for the current value of variables and measures on every single update, then could be justified by any annoyance with having to put DynamicVariables=1 where it is needed.
Flayre1
Posts: 12
Joined: June 26th, 2016, 10:41 pm

Re: Plugin: Chameleon

Post by Flayre1 »

Thanks for the help guys!
Got it working now, that was all that was wrong! Thanks for helping!!!
revengerro
Posts: 1
Joined: October 18th, 2017, 2:53 pm

Re: Plugin: Chameleon

Post by revengerro »

Hi im new to rainmeter , i realy want to change color to my rainmeter base on my wallpaper i know how to change the color but i do not understand how to auto change color ...... can someone make a youtube video how to do this or can help me in some way ? THX in advance and have a great day . :confused:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Plugin: Chameleon

Post by eclectic-tech »

revengerro wrote:Hi im new to rainmeter , i realy want to change color to my rainmeter base on my wallpaper i know how to change the color but i do not understand how to auto change color ...... can someone make a youtube video how to do this or can help me in some way ? THX in advance and have a great day . :confused:
Here is a skin that will show the colors the chameleon finds when you change your wallpaper. You do not need to do anything to get the new colors, the plugin will react to your change of the wallpaper, and generate new values for the measures. This skin shows the color in multiple ways, but you really only need the first 5 measures in your skin for it to work (see below the example skin).

Example: ChameleonColors.ini

Code: Select all

[Rainmeter]
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor2=235,235,235,164
SolidColor=20,20,20,164
GradientAngle=60

; ========= Variables ==========
[Variables]


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

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

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

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

[DesktopBG2]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Background2

[DesktopLight1]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Light1

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

[DesktopLight3]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Light3

[DesktopLight4]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Light4

[DesktopDark1]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Dark1

[DesktopDark2]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Dark2

[DesktopDark3]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Dark3

[DesktopDark4]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Dark4

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

[DesktopLuminance]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Luminance

[mTitle]
Measure=String
String=Chameleon Colors

; ========= Meter Styles ==========
[sColorBox]
X=20
Y=4R
W=220
AntiAlias=1
Padding=0,4,20,4
DynamicVariables=1
StringAlign=Left

[sSpacer]
Y=8R
H=1
SolidColor=0,0,0,1

; ========= Meters ==========
[SpacerT]
Meter=Image
MeterStyle=sSpacer

[Title]
Meter=String
MeterStyle=sColorBox
MeasureName=mTitle
X=85
FontColor=255,255,255
StringAlign=Center
StringStyle=Bold
SolidColor=0,0,0
Padding=20,4,20,4
InlineSetting=Color | 157,198,216
InlinePattern=(?U)^.*(C)hameleon
InlineSetting2=Color | 0,178,202
InlinePattern2=(?U)^.*C(h)ameleon
InlineSetting3=Color | 125,207,182
InlinePattern3=(?U)^.*Ch(a)meleon
InlineSetting4=Color | 58,141,242
InlinePattern4=(?U)^.*Cha(m)eleon
InlineSetting5=Color | 210,178,154
InlinePattern5=(?U)^.*Cham(e)leon
InlineSetting6=Color | 227,134,143
InlinePattern6=(?U)^.*Chame(l)eon
InlineSetting7=Color | 247,146,86
InlinePattern7=(?U)^.*Chamel(e)on
InlineSetting8=Color | 234,217,139
InlinePattern8=(?U)^.*Chamele(o)n
InlineSetting9=Color | 201,110,109
InlinePattern9=(?U)^.*Chameleo(n)
DynamicVariables=1

[SpacerM1]
Meter=Image
MeterStyle=sSpacer

[Forground1]
Meter=String
MeterStyle=sColorBox
MeasureName=DesktopFG1
FontColor=[DesktopFG1]
Text=Forground1: %1

[Background1]
Meter=String
MeterStyle=sColorBox
MeasureName=DesktopBG1
X=20
FontColor=[DesktopBG1]
Text=Background1: %1

[Example1Back]
Meter=Image
X=25
Y=4R
W=120
H=30
SolidColor=[DesktopBG1]
DynamicVariables=1

[Example1Forground]
Meter=String
X=([Example1Back:X]+[Example1Back:W]/2)
Y=([Example1Back:Y]+[Example1Back:H]/2)
StringAlign=CenterCenter
FontColor=[DesktopFG1]
Text=Forground1
DynamicVariables=1
AntiAlias=1

[SpacerM2]
Meter=Image
MeterStyle=sSpacer

[Forground2]
Meter=String
MeterStyle=sColorBox
MeasureName=DesktopFG2
FontColor=[DesktopFG2]
Text=Forground2: %1

[Background2]
Meter=String
MeterStyle=sColorBox
MeasureName=DesktopBG2
FontColor=[DesktopBG2]
Text=Background2: %1

[Example2Back]
Meter=Image
X=25
Y=4R
W=120
H=30
SolidColor=[DesktopBG2]
DynamicVariables=1

[Example2Forground]
Meter=String
X=([Example2Back:X]+[Example2Back:W]/2)
Y=([Example2Back:Y]+[Example2Back:H]/2)
StringAlign=CenterCenter
FontColor=[DesktopFG2]
Text=Forground2
DynamicVariables=1
AntiAlias=1

[SpacerM3]
Meter=Image
MeterStyle=sSpacer

[Light1]
Meter=String
MeterStyle=sColorBox
MeasureName=DesktopLight1
FontColor=[DesktopLight1]
Text=Light1: %1

[Light2]
Meter=String
MeterStyle=sColorBox
MeasureName=DesktopLight2
FontColor=[DesktopLight2]
Text=Light2: %1

[Light3]
Meter=String
MeterStyle=sColorBox
MeasureName=DesktopLight3
FontColor=[DesktopLight3]
Text=Light3: %1

[Light4]
Meter=String
MeterStyle=sColorBox
MeasureName=DesktopLight4
FontColor=[DesktopLight4]
Text=Light4: %1

[ExampleLight12]
Meter=Image
X=25
Y=4R
W=60
H=30
SolidColor=[DesktopLight1]A0
SolidColor2=[DesktopLight2]A0
DynamicVariables=1

[ExampleLight34]
Meter=Image
X=R
Y=r
W=60
H=30
SolidColor=[DesktopLight3]A0
SolidColor2=[DesktopLight4]A0
DynamicVariables=1

[SpacerM4]
Meter=Image
MeterStyle=sSpacer

[Dark1]
Meter=String
MeterStyle=sColorBox
MeasureName=DesktopDark1
FontColor=[DesktopDark1]
Text=Dark1: %1

[Dark2]
Meter=String
MeterStyle=sColorBox
MeasureName=DesktopDark2
FontColor=[DesktopDark2]
Text=Dark2: %1

[Dark3]
Meter=String
MeterStyle=sColorBox
MeasureName=DesktopDark3
FontColor=[DesktopDark3]
Text=Dark3: %1

[Dark4]
Meter=String
MeterStyle=sColorBox
MeasureName=DesktopDark4
FontColor=[DesktopDark4]
Text=Dark4: %1

[ExampleDark12]
Meter=Image
X=25
Y=4R
W=60
H=30
SolidColor=[DesktopDark1]A0
SolidColor2=[DesktopDark2]A0
DynamicVariables=1

[ExampleDark34]
Meter=Image
X=R
Y=r
W=60
H=30
SolidColor=[DesktopDark3]A0
SolidColor2=[DesktopDark4]A0
DynamicVariables=1

[SpacerM5]
Meter=Image
MeterStyle=sSpacer

[Average]
Meter=String
MeterStyle=sColorBox
MeasureName=DesktopAverage
FontColor=[DesktopAverage]
Text=Average: %1

[ExampleAverage]
Meter=Image
X=25
Y=4R
W=120
H=30
SolidColor=[DesktopAverage]
DynamicVariables=1

[SpacerM6]
Meter=Image
MeterStyle=sSpacer

[Luminance]
Meter=String
MeterStyle=sColorBox
MeasureName=DesktopLuminance
NumOfDecimals=5
Text=Luminance: %1

[ExampleLuminanceBlackBox]
Meter=Image
X=25
Y=4R
W=120
H=30
SolidColor=0,0,0,255
DynamicVariables=1

[ExampleLuminance]
Meter=Image
X=1r
Y=1r
W=118
H=28
SolidColor=([DesktopLuminance]*255),([DesktopLuminance]*255),([DesktopLuminance]*255),255
DynamicVariables=1

[ExampleLuminanceWhiteBox]
Meter=Image
X=51r
Y=12r
W=16
H=4
SolidColor=255,255,255,255
DynamicVariables=1

[SpacerB]
Meter=Image
MeterStyle=sSpacer
Y=([ExampleLuminance:H]+4)r
chameleonex.png
USE IN YOU SKIN
If you have the 5 measures below in your skin (same as in the example), then the chameleon measures: DesktopBG1, DesktopFG1, DesktopBG2, DesktopFG2 will have color values based on the 'Desktop'. Then all you need to do is assign those measures as the colors for your meters; as was done in the example skin above. e.g. FontColor=[DesktopFG1]

Code: Select all

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

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

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

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

[DesktopBG2]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Color=Background2
This is the direct way to use the plugin. You could also have the measures write the color values to variables in the skin, in another config, or in an external file... then use those variables anywhere.

One other method I have used involves the SysColor.dll plugin to monitor Windows accent color and call a skin with the chameleon measures in it to set new colors (or take some other action).

Code: Select all

[MeasureColorTrigger]
Measure=Plugin
Plugin=SysColor
ColorType=DWM_COLOR
DisplayType=RGB
OnChangeAction=["ActionToTakeOnChange"]
DynamicVariables=1
How you implement this is up to you. Hope this helps. :welcome:
Post Reply