@People better at this than me: How can I isolate the RGB code to a .inc file, and use the color variables globally through the skin? I'd like to include some custom gauges etc that use the same RGB variables. The only challenge would be getting the skin to update the variables. I made an attempt but not totally sure how to go about it.
IMGUR DEMO https://imgur.com/QaDKQSN
MY PNG FILE IS ATTACHED
Code: Select all
[Rainmeter]
Update = 25
[Variables]
Red=255
Green=255
Blue=255
Reset=0
[Image_To_RGB_Tint]
Meter = Image
ImageName=#@#Images\Image.png
PreserveAspectRatio=1
ImageTint=#Red#,#Green#,#Blue#
DynamicVariables=1
;===========================================================================
[Change_Colors]
Measure=Calc
IfConditionMode=1
DynamicVariables=1
;=== ( Red )
IfCondition=(#Red#=255)&&(#Green#<=255)&&(#Green#>0)&&(#Blue#<=255)&&(#Blue#>0)&&(#Reset#=0)
IfTrueAction=[!SetVariable Green "(#Green#-5)"]&&[!SetVariable Blue "(#Blue#-5)"]
;=== ( Purple )
IfCondition2=(#Red#=255)&&(#Green#=0)&&(#Blue#>=0)&&(#Blue#<255)
IfTrueAction2=[!SetVariable Blue "(#Blue#+5)"]
IfCondition3=(#Red#=255)&&(#Green#=0)&&(#Blue#>=0)&&(#Blue#<255)
IfTrueAction3=!SetVariable Blue "(#Blue#+5)"
;=== ( Blue )
IfCondition4=(#Red#<=255)&&(#Red#>0)&&(#Green#=0)&&(#Blue#=255)
IfTrueAction4=!SetVariable Red "(#Red#-5)"
;== ( Cyan )
IfCondition5=(#Red#=0)&&(#Green#>=0)&&(#Green#<255)&&(#Blue#=255)
IfTrueAction5= !SetVariable Green "(#Green#+5)"
;== ( Green )
IfCondition6=(#Red#=0)&&(#Green#=255)&&(#Blue#<=255)&&(#Blue#>0)
IfTrueAction6=!SetVariable Blue "(#Blue#-5)"
;== ( Yellow )
IfCondition7=(#Red#>=0)&&(#Red#<255)&&(#Green#=255)&&(#Blue#=0)
IfTrueAction7=[!SetVariable Red "(#Red#+5)"]&&[!SetVariable Reset "1"]
;== ( Reset )
IfCondition8=(#Red#=255)&&(#Green#=255)&&(#Blue#>=0)&&(#Blue#<255)&&(#Reset#=1)
IfTrueAction8=!SetVariable Blue "(#Blue#+5)"
IfCondition9=(#Red#=255)&&(#Green#=255)&&(#Blue#=255)&&(#Reset#=1)
IfTrueAction9=!SetVariable Reset "0"