It is currently July 18th, 2019, 12:00 pm

Complementary Colors

Help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 8369
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Complementary Colors

balala » January 28th, 2019, 8:51 pm

eclectic-tech wrote:
January 28th, 2019, 8:46 pm
It could be changed to write the values to a variable in a skin, or included file, then refresh the skin. So yes it can be done...
This is already done. There are more !WriteKeyValue bangs to achieve this, on all LeftMouseUpAction options.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3405
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Complementary Colors

eclectic-tech » January 28th, 2019, 8:57 pm

balala wrote:
January 28th, 2019, 8:51 pm
This is already done. There are more !WriteKeyValue bangs to achieve this, on all LeftMouseUpAction options.
I never read your posts anymore... :sly: ;-)

I was just answering his question. Your code should help get them were they need to be! :thumbup:
mattitta
Posts: 14
Joined: January 26th, 2019, 3:17 am

Re: Complementary Colors

mattitta » January 28th, 2019, 11:42 pm

Once again thank you that is exactly what I would like to do balala but if it would make it easier to only have one set of colors i can live with that. elcectic-tech I've downloaded color triad will be giving that a try, also I found another code by DollarD here's the link https://forum.rainmeter.net/viewtopic.php?f=119&t=26837&start=10 but no rmskin file and i'm not sure how to install it.
User avatar
balala
Rainmeter Sage
Posts: 8369
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Complementary Colors

balala » January 29th, 2019, 10:12 am

mattitta wrote:
January 28th, 2019, 11:42 pm
Once again thank you that is exactly what I would like to do balala but if it would make it easier to only have one set of colors i can live with that.
No, no need to have just one of those two colors. Perfectly doable I think. Here is the rewritten code of the Skins\Test Skin\Settings\Settings.ini file:

Code: Select all

[Rainmeter]
Update=1000

[Variables]
@include=#@#Variables.inc

[MeterShape]
Meter=Shape
x=0
y=0
Shape=Rectangle 0,0,300,400 | Fill Color #ImageTint#,50 | Stroke Color #FontColor#
DynamicVariables=1

[MeterLine]
Meter=Image
SolidColor=#FontColor#
x=0
y=200
w=300
h=1
DynamicVariables=1

[MeterFontText]
Meter=String
StringAlign=Center
StringCase=Upper
FontFace=
FontColor=[MeasureComplementaryColor]
FontSize=15
X=150
Y=15
Text=Font Colors
AntiAlias=1
DynamicVariables=1
Group=Strings

[MeterImageText]
Meter=String
StringAlign=Center
StringCase=Upper
FontFace=Calibri
FontColor=[MeasureComplementaryColor]
FontSize=15
X=150
Y=215
Text=Image Colors
AntiAlias=1
DynamicVariables=1
Group=Strings

[MeasureRed]
Measure=String
String=#ImageTint#
RegExpSubstitute=1
Substitute="^(\d{1,3}),(\d{1,3}),(\d{1,3})$":"\1"
DynamicVariables=1
Group=Colors

[MeasureGreen]
Measure=String
String=#ImageTint#
RegExpSubstitute=1
Substitute="^(\d{1,3}),(\d{1,3}),(\d{1,3})$":"\2"
DynamicVariables=1
Group=Colors

[MeasureBlue]
Measure=String
String=#ImageTint#
RegExpSubstitute=1
Substitute="^(\d{1,3}),(\d{1,3}),(\d{1,3})$":"\3"
DynamicVariables=1
Group=Colors

[MeasureComplementaryRed]
Measure=Calc
Formula=(( Max ( [MeasureRed], Max ( [MeasureGreen], [MeasureBlue] ))) + ( Min ( [MeasureRed], Min ( [MeasureGreen], [MeasureBlue] ))) - [MeasureRed] )
DynamicVariables=1
;Disabled=1
Group=Components

[MeasureComplementaryGreen]
Measure=Calc
Formula=(( Max ( [MeasureRed], Max ( [MeasureGreen], [MeasureBlue] ))) + ( Min ( [MeasureRed], Min ( [MeasureGreen], [MeasureBlue] ))) - [MeasureGreen] )
DynamicVariables=1
;Disabled=1
Group=Components

[MeasureComplementaryBlue]
Measure=Calc
Formula=(( Max ( [MeasureRed], Max ( [MeasureGreen], [MeasureBlue] ))) + ( Min ( [MeasureRed], Min ( [MeasureGreen], [MeasureBlue] ))) - [MeasureBlue] )
DynamicVariables=1
;Disabled=1
Group=Components

[MeasureComplementaryColor]
Measure=String
String=[MeasureComplementaryRed],[MeasureComplementaryGreen],[MeasureComplementaryBlue]
DynamicVariables=1
;Disabled=1
Group=Components

[MeterColorWhite]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=50
Y=60
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,255,255" "#@#Variables.inc"][!SetVariable FontColor "255,255,255"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!Redraw]
ImageTint=255,255,255
ToolTipText="White"

[MeterColorBlack]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,0,0" "#@#Variables.inc"][!SetVariable FontColor "0,0,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=0,0,0
ToolTipText="Black"

[MeterColorRed]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,0,0" "#@#Variables.inc"][!SetVariable FontColor "255,0,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=255,0,0
ToolTipText="Red"

[MeterColorGreen]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,128,0" "#@#Variables.inc"][!SetVariable FontColor "0,128,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=0,128,0
ToolTipText="Green"

[MeterColorBlue]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,0,255" "#@#Variables.inc"][!SetVariable FontColor "0,0,255"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=0,0,255
ToolTipText="Blue"

[MeterColorCyan]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,255,255" "#@#Variables.inc"][!SetVariable FontColor "0,255,255"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=0,255,255
ToolTipText="Cyan"

[MeterColorMagenta]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=50
Y=40r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,0,255" "#@#Variables.inc"][!SetVariable FontColor "255,0,255"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=255,0,255
ToolTipText="Magenta"

[MeterColorYellow]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,255,0" "#@#Variables.inc"][!SetVariable FontColor "255,255,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=255,255,0
ToolTipText="Yellow"

[MeterColorLime]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,255,0" "#@#Variables.inc"][!SetVariable FontColor "0,255,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=0,255,0
ToolTipText="Lime"

[MeterColorOrange]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,165,0" "#@#Variables.inc"][!SetVariable FontColor "255,165,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=255,165,0
ToolTipText="Orange"

[MeterColorPurple]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "128,0,128" "#@#Variables.inc"][!SetVariable FontColor "128,0,128"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=128,0,128
ToolTipText="Purple"

[MeterColorBrown]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "165,42,42" "#@#Variables.inc"][!SetVariable FontColor "165,42,42"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=165,42,42
ToolTipText="Brown"

[MeterImageColorWhite]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=50
Y=260
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,255,255" "#@#Variables.inc"][!SetVariable ImageTint "255,255,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=255,255,255
ToolTipText="White"

[MeterImageColorBlack]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,0,0" "#@#Variables.inc"][!SetVariable ImageTint "0,0,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=0,0,0
ToolTipText="Black"

[MeterImageColorRed]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,0,0" "#@#Variables.inc"][!SetVariable ImageTint "255,0,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=255,0,0
ToolTipText="Red"

[MeterImageColorGreen]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,128,0" "#@#Variables.inc"][!SetVariable ImageTint "0,128,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=0,128,0
ToolTipText="Green"

[MeterImageColorBlue]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,0,255" "#@#Variables.inc"][!SetVariable ImageTint "0,0,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=0,0,255
ToolTipText="Blue"

[MeterImageColorCyan]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,255,255" "#@#Variables.inc"][!SetVariable ImageTint "0,255,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=0,255,255
ToolTipText="Cyan"

[MeterImageColorMagenta]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=50
Y=40r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,0,255" "#@#Variables.inc"][!SetVariable ImageTint "255,0,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=255,0,255
ToolTipText="Magenta"

[MeterImageColorYellow]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,255,0" "#@#Variables.inc"][!SetVariable ImageTint "255,255,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=255,255,0
ToolTipText="Yellow"

[MeterImageColorLime]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,255,0" "#@#Variables.inc"][!SetVariable ImageTint "0,255,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=0,255,0
ToolTipText="Lime"

[MeterImageColorOrange]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,165,0" "#@#Variables.inc"][!SetVariable ImageTint "255,165,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=255,165,0
ToolTipText="Orange"

[MeterImageColorPurple]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "128,0,128" "#@#Variables.inc"][!SetVariable ImageTint "128,0,128"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw]
ImageTint=128,0,128
ToolTipText="Purple"

[MeterImageColorBrown]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "165,42,42" "#@#Variables.inc"][!SetVariable ImageTint "165,42,42"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!Redraw]
ImageTint=165,42,42
ToolTipText="Brown"
Please test the above code and let me know if something doesn't go as intended.
mattitta
Posts: 14
Joined: January 26th, 2019, 3:17 am

Re: Complementary Colors

mattitta » January 30th, 2019, 3:44 am

Thanks balala for helping, but it still doesn't do what I need it to do. In the image you can see what happens, I clicked the lime button for image colors and the fill color changed to lime, the text, stroke and line color changed to magenta which is right, but if you look at the volume skin there was no change. When I check the variables.inc file imagetint changed but fontcolor does not, now if I right click the volume skin and click refresh skin the bar color changes to lime but the text does not change to magenta. eclectic-tech the color triad works but how would I get it to change the variables.inc file automatically and refresh all the skins.
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3405
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Complementary Colors

eclectic-tech » January 30th, 2019, 1:07 pm

The skin changes the values in the 'variables.inc' file and changes the colors in the settings skin, but in order to have the changes show in other skins that use that 'variables.inc' file you need to refresh them.

The simplest way to do this is to add all skins that use the included variables file to a skin group. Do this by adding a line to the [Rainmeter] section of those skins. You can name the skin group any unique name you want; I chose Group=MyComplimentarySkins

Add that line to the [Rainmeter] section of your volume skin and refresh it. Add this to any other skins that use the included variables file.

To refresh all skins that use those variables when you click on a color in the settings skin, add a !RefeshGroup bang to all of the LeftMouseUpActions in the 'Setting.ini file.

In every LeftMouseUpAction bang in the settings skin, add [!RefreshGroup MyComplimentarySkins right after [!Redraw]. Save and refresh the settings skin.

Now when you click a color in the settings skin, all skins that are in the group 'MyComplimentarySkins' will be refreshed and use the new variable values.

Here is the 'Settings.ini' modified with the group refresh.

Code: Select all

[Rainmeter]
Update=1000

[Variables]
@include=#@#Variables.inc

[MeterShape]
Meter=Shape
x=0
y=0
Shape=Rectangle 0,0,300,400 | Fill Color #ImageTint#,50 | Stroke Color #FontColor#
DynamicVariables=1

[MeterLine]
Meter=Image
SolidColor=#FontColor#
x=0
y=200
w=300
h=1
DynamicVariables=1

[MeterFontText]
Meter=String
StringAlign=Center
StringCase=Upper
FontFace=
FontColor=[MeasureComplementaryColor]
FontSize=15
X=150
Y=15
Text=Font Colors
AntiAlias=1
DynamicVariables=1
Group=Strings

[MeterImageText]
Meter=String
StringAlign=Center
StringCase=Upper
FontFace=Calibri
FontColor=[MeasureComplementaryColor]
FontSize=15
X=150
Y=215
Text=Image Colors
AntiAlias=1
DynamicVariables=1
Group=Strings

[MeasureRed]
Measure=String
String=#ImageTint#
RegExpSubstitute=1
Substitute="^(\d{1,3}),(\d{1,3}),(\d{1,3})$":"\1"
DynamicVariables=1
Group=Colors

[MeasureGreen]
Measure=String
String=#ImageTint#
RegExpSubstitute=1
Substitute="^(\d{1,3}),(\d{1,3}),(\d{1,3})$":"\2"
DynamicVariables=1
Group=Colors

[MeasureBlue]
Measure=String
String=#ImageTint#
RegExpSubstitute=1
Substitute="^(\d{1,3}),(\d{1,3}),(\d{1,3})$":"\3"
DynamicVariables=1
Group=Colors

[MeasureComplementaryRed]
Measure=Calc
Formula=(( Max ( [MeasureRed], Max ( [MeasureGreen], [MeasureBlue] ))) + ( Min ( [MeasureRed], Min ( [MeasureGreen], [MeasureBlue] ))) - [MeasureRed] )
DynamicVariables=1
;Disabled=1
Group=Components

[MeasureComplementaryGreen]
Measure=Calc
Formula=(( Max ( [MeasureRed], Max ( [MeasureGreen], [MeasureBlue] ))) + ( Min ( [MeasureRed], Min ( [MeasureGreen], [MeasureBlue] ))) - [MeasureGreen] )
DynamicVariables=1
;Disabled=1
Group=Components

[MeasureComplementaryBlue]
Measure=Calc
Formula=(( Max ( [MeasureRed], Max ( [MeasureGreen], [MeasureBlue] ))) + ( Min ( [MeasureRed], Min ( [MeasureGreen], [MeasureBlue] ))) - [MeasureBlue] )
DynamicVariables=1
;Disabled=1
Group=Components

[MeasureComplementaryColor]
Measure=String
String=[MeasureComplementaryRed],[MeasureComplementaryGreen],[MeasureComplementaryBlue]
DynamicVariables=1
;Disabled=1
Group=Components

[MeterColorWhite]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=50
Y=60
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,255,255" "#@#Variables.inc"][!SetVariable FontColor "255,255,255"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=255,255,255
ToolTipText="White"

[MeterColorBlack]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,0,0" "#@#Variables.inc"][!SetVariable FontColor "0,0,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=0,0,0
ToolTipText="Black"

[MeterColorRed]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,0,0" "#@#Variables.inc"][!SetVariable FontColor "255,0,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=255,0,0
ToolTipText="Red"

[MeterColorGreen]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,128,0" "#@#Variables.inc"][!SetVariable FontColor "0,128,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=0,128,0
ToolTipText="Green"

[MeterColorBlue]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,0,255" "#@#Variables.inc"][!SetVariable FontColor "0,0,255"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=0,0,255
ToolTipText="Blue"

[MeterColorCyan]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,255,255" "#@#Variables.inc"][!SetVariable FontColor "0,255,255"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=0,255,255
ToolTipText="Cyan"

[MeterColorMagenta]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=50
Y=40r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,0,255" "#@#Variables.inc"][!SetVariable FontColor "255,0,255"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=255,0,255
ToolTipText="Magenta"

[MeterColorYellow]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,255,0" "#@#Variables.inc"][!SetVariable FontColor "255,255,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=255,255,0
ToolTipText="Yellow"

[MeterColorLime]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,255,0" "#@#Variables.inc"][!SetVariable FontColor "0,255,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=0,255,0
ToolTipText="Lime"

[MeterColorOrange]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,165,0" "#@#Variables.inc"][!SetVariable FontColor "255,165,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=255,165,0
ToolTipText="Orange"

[MeterColorPurple]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "128,0,128" "#@#Variables.inc"][!SetVariable FontColor "128,0,128"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=128,0,128
ToolTipText="Purple"

[MeterColorBrown]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "165,42,42" "#@#Variables.inc"][!SetVariable FontColor "165,42,42"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=165,42,42
ToolTipText="Brown"

[MeterImageColorWhite]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=50
Y=260
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,255,255" "#@#Variables.inc"][!SetVariable ImageTint "255,255,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=255,255,255
ToolTipText="White"

[MeterImageColorBlack]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,0,0" "#@#Variables.inc"][!SetVariable ImageTint "0,0,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=0,0,0
ToolTipText="Black"

[MeterImageColorRed]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,0,0" "#@#Variables.inc"][!SetVariable ImageTint "255,0,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=255,0,0
ToolTipText="Red"

[MeterImageColorGreen]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,128,0" "#@#Variables.inc"][!SetVariable ImageTint "0,128,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=0,128,0
ToolTipText="Green"

[MeterImageColorBlue]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,0,255" "#@#Variables.inc"][!SetVariable ImageTint "0,0,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=0,0,255
ToolTipText="Blue"

[MeterImageColorCyan]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,255,255" "#@#Variables.inc"][!SetVariable ImageTint "0,255,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=0,255,255
ToolTipText="Cyan"

[MeterImageColorMagenta]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=50
Y=40r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,0,255" "#@#Variables.inc"][!SetVariable ImageTint "255,0,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=255,0,255
ToolTipText="Magenta"

[MeterImageColorYellow]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,255,0" "#@#Variables.inc"][!SetVariable ImageTint "255,255,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=255,255,0
ToolTipText="Yellow"

[MeterImageColorLime]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,255,0" "#@#Variables.inc"][!SetVariable ImageTint "0,255,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=0,255,0
ToolTipText="Lime"

[MeterImageColorOrange]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,165,0" "#@#Variables.inc"][!SetVariable ImageTint "255,165,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=255,165,0
ToolTipText="Orange"

[MeterImageColorPurple]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "128,0,128" "#@#Variables.inc"][!SetVariable ImageTint "128,0,128"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=128,0,128
ToolTipText="Purple"

[MeterImageColorBrown]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "165,42,42" "#@#Variables.inc"][!SetVariable ImageTint "165,42,42"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!Redraw][!RefreshGroup MyComplimentarySkins]
ImageTint=165,42,42
ToolTipText="Brown"
The volume skin [Rainmeter] looks like this

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,1

Group=MyComplimentarySkins

[Variables]
VolumeIncrement=1
@include=#@#Variables.inc

...
User avatar
balala
Rainmeter Sage
Posts: 8369
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Complementary Colors

balala » January 30th, 2019, 2:42 pm

eclectic-tech wrote:
January 30th, 2019, 1:07 pm
The skin changes the values in the 'variables.inc' file and changes the colors in the settings skin, but in order to have the changes show in other skins that use that 'variables.inc' file you need to refresh them.

The simplest way to do this is to add all skins that use the included variables file to a skin group. Do this by adding a line to the [Rainmeter] section of those skins. You can name the skin group any unique name you want; I chose Group=MyComplimentarySkins

Add that line to the [Rainmeter] section of your volume skin and refresh it. Add this to any other skins that use the included variables file.

To refresh all skins that use those variables when you click on a color in the settings skin, add a !RefeshGroup bang to all of the LeftMouseUpActions in the 'Setting.ini file.

In every LeftMouseUpAction bang in the settings skin, add [!RefreshGroup MyComplimentarySkins right after [!Redraw]. Save and refresh the settings skin.

Now when you click a color in the settings skin, all skins that are in the group 'MyComplimentarySkins' will be refreshed and use the new variable values.
Completely agree with eclectic-tech, I just would add something: besides creating the MyComplimentarySkins group, you also will want to write the complementary color, into the Variables.inc file. Easiest way to do this is to add an OnChangeAction option to [MeasureComplementaryColor] measure and add the appropriate !WriteKeyValue bang into this option.
Here is my modified code:

Code: Select all

[Rainmeter]
Update=1000

[Variables]
@include=#@#Variables.inc

[MeterShape]
Meter=Shape
x=0
y=0
Shape=Rectangle 0,0,300,400 | Fill Color #ImageTint#,50 | Stroke Color #FontColor#
DynamicVariables=1

[MeterLine]
Meter=Image
SolidColor=#FontColor#
x=0
y=200
w=300
h=1
DynamicVariables=1

[MeterFontText]
Meter=String
StringAlign=Center
StringCase=Upper
FontFace=
FontColor=[MeasureComplementaryColor]
FontSize=15
X=150
Y=15
Text=Font Colors
AntiAlias=1
DynamicVariables=1
Group=Strings

[MeterImageText]
Meter=String
StringAlign=Center
StringCase=Upper
FontFace=Calibri
FontColor=[MeasureComplementaryColor]
FontSize=15
X=150
Y=215
Text=Image Colors
AntiAlias=1
DynamicVariables=1
Group=Strings

[MeasureRed]
Measure=String
String=#ImageTint#
RegExpSubstitute=1
Substitute="^(\d{1,3}),(\d{1,3}),(\d{1,3})$":"\1"
DynamicVariables=1
Group=Colors

[MeasureGreen]
Measure=String
String=#ImageTint#
RegExpSubstitute=1
Substitute="^(\d{1,3}),(\d{1,3}),(\d{1,3})$":"\2"
DynamicVariables=1
Group=Colors

[MeasureBlue]
Measure=String
String=#ImageTint#
RegExpSubstitute=1
Substitute="^(\d{1,3}),(\d{1,3}),(\d{1,3})$":"\3"
DynamicVariables=1
Group=Colors

[MeasureComplementaryRed]
Measure=Calc
Formula=(( Max ( [MeasureRed], Max ( [MeasureGreen], [MeasureBlue] ))) + ( Min ( [MeasureRed], Min ( [MeasureGreen], [MeasureBlue] ))) - [MeasureRed] )
DynamicVariables=1
;Disabled=1
Group=Components

[MeasureComplementaryGreen]
Measure=Calc
Formula=(( Max ( [MeasureRed], Max ( [MeasureGreen], [MeasureBlue] ))) + ( Min ( [MeasureRed], Min ( [MeasureGreen], [MeasureBlue] ))) - [MeasureGreen] )
DynamicVariables=1
;Disabled=1
Group=Components

[MeasureComplementaryBlue]
Measure=Calc
Formula=(( Max ( [MeasureRed], Max ( [MeasureGreen], [MeasureBlue] ))) + ( Min ( [MeasureRed], Min ( [MeasureGreen], [MeasureBlue] ))) - [MeasureBlue] )
DynamicVariables=1
;Disabled=1
Group=Components

[MeasureComplementaryColor]
Measure=String
String=[MeasureComplementaryRed],[MeasureComplementaryGreen],[MeasureComplementaryBlue]
DynamicVariables=1
OnChangeAction=[!WriteKeyValue Variables FontColor "[MeasureComplementaryColor]" "#@#Variables.inc"]
Group=Components

[MeterColorWhite]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=50
Y=60
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,255,255" "#@#Variables.inc"][!SetVariable FontColor "255,255,255"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,255,255
ToolTipText=White

[MeterColorBlack]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,0,0" "#@#Variables.inc"][!SetVariable FontColor "0,0,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,0,0
ToolTipText=Black

[MeterColorRed]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,0,0" "#@#Variables.inc"][!SetVariable FontColor "255,0,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,0,0
ToolTipText=Red

[MeterColorGreen]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,128,0" "#@#Variables.inc"][!SetVariable FontColor "0,128,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,128,0
ToolTipText=Green

[MeterColorBlue]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,0,255" "#@#Variables.inc"][!SetVariable FontColor "0,0,255"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,0,255
ToolTipText=Blue

[MeterColorCyan]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,255,255" "#@#Variables.inc"][!SetVariable FontColor "0,255,255"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,255,255
ToolTipText=Cyan

[MeterColorMagenta]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=50
Y=40r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,0,255" "#@#Variables.inc"][!SetVariable FontColor "255,0,255"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,0,255
ToolTipText=Magenta

[MeterColorYellow]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,255,0" "#@#Variables.inc"][!SetVariable FontColor "255,255,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,255,0
ToolTipText=Yellow

[MeterColorLime]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "0,255,0" "#@#Variables.inc"][!SetVariable FontColor "0,255,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,255,0
ToolTipText=Lime

[MeterColorOrange]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "255,165,0" "#@#Variables.inc"][!SetVariable FontColor "255,165,0"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,165,0
ToolTipText=Orange

[MeterColorPurple]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "128,0,128" "#@#Variables.inc"][!SetVariable FontColor "128,0,128"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=128,0,128
ToolTipText=Purple

[MeterColorBrown]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables FontColor "165,42,42" "#@#Variables.inc"][!SetVariable FontColor "165,42,42"][!SetOptionGroup Colors String "#*FontColor*#"][!SetOptionGroup Strings FontColor "#*FontColor*#"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=165,42,42
ToolTipText=Brown

[MeterImageColorWhite]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=50
Y=260
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,255,255" "#@#Variables.inc"][!SetVariable ImageTint "255,255,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,255,255
ToolTipText=White

[MeterImageColorBlack]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,0,0" "#@#Variables.inc"][!SetVariable ImageTint "0,0,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,0,0
ToolTipText=Black

[MeterImageColorRed]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,0,0" "#@#Variables.inc"][!SetVariable ImageTint "255,0,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,0,0
ToolTipText=Red

[MeterImageColorGreen]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,128,0" "#@#Variables.inc"][!SetVariable ImageTint "0,128,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,128,0
ToolTipText=Green

[MeterImageColorBlue]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,0,255" "#@#Variables.inc"][!SetVariable ImageTint "0,0,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,0,255
ToolTipText=Blue

[MeterImageColorCyan]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,255,255" "#@#Variables.inc"][!SetVariable ImageTint "0,255,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,255,255
ToolTipText=Cyan

[MeterImageColorMagenta]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=50
Y=40r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,0,255" "#@#Variables.inc"][!SetVariable ImageTint "255,0,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,0,255
ToolTipText=Magenta

[MeterImageColorYellow]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,255,0" "#@#Variables.inc"][!SetVariable ImageTint "255,255,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,255,0
ToolTipText=Yellow

[MeterImageColorLime]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,255,0" "#@#Variables.inc"][!SetVariable ImageTint "0,255,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,255,0
ToolTipText=Lime

[MeterImageColorOrange]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,165,0" "#@#Variables.inc"][!SetVariable ImageTint "255,165,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,165,0
ToolTipText=Orange

[MeterImageColorPurple]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "128,0,128" "#@#Variables.inc"][!SetVariable ImageTint "128,0,128"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=128,0,128
ToolTipText=Purple

[MeterImageColorBrown]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "165,42,42" "#@#Variables.inc"][!SetVariable ImageTint "165,42,42"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!UpdateMeter "MeterShape"][!UpdateMeter "MeterLine"][!UpdateMeter "MeterFontText"][!Updatemeter "MeterImageText"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=165,42,42
ToolTipText=Brown
Note that this code will properly work only if you add the Group=MyComplimentarySkins option to the [Rainmeter] section of all skins which are using the Variables.inc file (as described by eclectic-tech above).
And one more: the quotations are not needed (well, in fact are useless) into any option. That's why I've removed them from the ToolTipText options. Details: https://forum.rainmeter.net/viewtopic.php?f=5&t=26350&p=137628&hilit=quote+enclose+option#p137628
mattitta
Posts: 14
Joined: January 26th, 2019, 3:17 am

Re: Complementary Colors

mattitta » February 1st, 2019, 2:51 am

Thanks again, so here goes there is is slight difference between the two codes. balala no quotation marks eclectic-tech with quotation marks on ToolTipText but I don't think that makes a difference,where you placed redraw is also different balala at the end eclectic-tech before refreshgroup. That seemed to make a difference as it would not refresh the skin if I used eclectic-tech's code no big deal, because I was testing both codes and then noticed the difference. With both codes the the metershape strokecolor and the meterline solidcolor would not change unless I would right click the skin and refreshed it, I then changed #fontColor# to [measurecomlimentarycolor] and that did the trick. It only works if I click on one of the image color buttons and get rid of all of the font colors also removed all the updatemeter metershape, meterline, meterfonttext and meterimagetext.

Code: Select all

[Rainmeter]
Update=1000

[Variables]
@include=#@#Variables.inc

[MeterShape]
Meter=Shape
x=0
y=0
Shape=Rectangle 0,0,300,400 | Fill Color #ImageTint#,50 | Stroke Color [MeasureComplementaryColor]
DynamicVariables=1

[MeterLine]
Meter=Image
SolidColor=[MeasureComplementaryColor]
x=0
y=200
w=300
h=1
DynamicVariables=1

[MeterFontText]
Meter=String
StringAlign=Center
StringCase=Upper
FontFace=
FontColor=[MeasureComplementaryColor]
FontSize=15
X=150
Y=15
Text=Font Colors
AntiAlias=1
DynamicVariables=1
Group=Strings

[MeterImageText]
Meter=String
StringAlign=Center
StringCase=Upper
FontFace=Calibri
FontColor=[MeasureComplementaryColor]
FontSize=15
X=150
Y=215
Text=Image Colors
AntiAlias=1
DynamicVariables=1
Group=Strings

[MeasureRed]
Measure=String
String=#ImageTint#
RegExpSubstitute=1
Substitute="^(\d{1,3}),(\d{1,3}),(\d{1,3})$":"\1"
DynamicVariables=1
Group=Colors

[MeasureGreen]
Measure=String
String=#ImageTint#
RegExpSubstitute=1
Substitute="^(\d{1,3}),(\d{1,3}),(\d{1,3})$":"\2"
DynamicVariables=1
Group=Colors

[MeasureBlue]
Measure=String
String=#ImageTint#
RegExpSubstitute=1
Substitute="^(\d{1,3}),(\d{1,3}),(\d{1,3})$":"\3"
DynamicVariables=1
Group=Colors

[MeasureComplementaryRed]
Measure=Calc
Formula=(( Max ( [MeasureRed], Max ( [MeasureGreen], [MeasureBlue] ))) + ( Min ( [MeasureRed], Min ( [MeasureGreen], [MeasureBlue] ))) - [MeasureRed] )
DynamicVariables=1
;Disabled=1
Group=Components

[MeasureComplementaryGreen]
Measure=Calc
Formula=(( Max ( [MeasureRed], Max ( [MeasureGreen], [MeasureBlue] ))) + ( Min ( [MeasureRed], Min ( [MeasureGreen], [MeasureBlue] ))) - [MeasureGreen] )
DynamicVariables=1
;Disabled=1
Group=Components

[MeasureComplementaryBlue]
Measure=Calc
Formula=(( Max ( [MeasureRed], Max ( [MeasureGreen], [MeasureBlue] ))) + ( Min ( [MeasureRed], Min ( [MeasureGreen], [MeasureBlue] ))) - [MeasureBlue] )
DynamicVariables=1
;Disabled=1
Group=Components

[MeasureComplementaryColor]
Measure=String
String=[MeasureComplementaryRed],[MeasureComplementaryGreen],[MeasureComplementaryBlue]
DynamicVariables=1
OnChangeAction=[!WriteKeyValue Variables FontColor "[MeasureComplementaryColor]" "#@#Variables.inc"]
Group=Components

[MeterImageColorWhite]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=50
Y=260
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,255,255" "#@#Variables.inc"][!SetVariable ImageTint "255,255,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,255,255
ToolTipText=White

[MeterImageColorBlack]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,0,0" "#@#Variables.inc"][!SetVariable ImageTint "0,0,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,0,0
ToolTipText=Black

[MeterImageColorRed]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,0,0" "#@#Variables.inc"][!SetVariable ImageTint "255,0,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,0,0
ToolTipText=Red

[MeterImageColorGreen]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,128,0" "#@#Variables.inc"][!SetVariable ImageTint "0,128,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,128,0
ToolTipText=Green

[MeterImageColorBlue]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,0,255" "#@#Variables.inc"][!SetVariable ImageTint "0,0,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,0,255
ToolTipText=Blue

[MeterImageColorCyan]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,255,255" "#@#Variables.inc"][!SetVariable ImageTint "0,255,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,255,255
ToolTipText=Cyan

[MeterImageColorMagenta]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=50
Y=40r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,0,255" "#@#Variables.inc"][!SetVariable ImageTint "255,0,255"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,0,255
ToolTipText=Magenta

[MeterImageColorYellow]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,255,0" "#@#Variables.inc"][!SetVariable ImageTint "255,255,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,255,0
ToolTipText=Yellow

[MeterImageColorLime]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "0,255,0" "#@#Variables.inc"][!SetVariable ImageTint "0,255,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=0,255,0
ToolTipText=Lime

[MeterImageColorOrange]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "255,165,0" "#@#Variables.inc"][!SetVariable ImageTint "255,165,0"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=255,165,0
ToolTipText=Orange

[MeterImageColorPurple]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "128,0,128" "#@#Variables.inc"][!SetVariable ImageTint "128,0,128"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=128,0,128
ToolTipText=Purple

[MeterImageColorBrown]
Meter=IMAGE
ImageName=#@#ColorBox.png
X=35r
Y=r
W=30
LeftMouseUpAction=[!WriteKeyValue Variables ImageTint "165,42,42" "#@#Variables.inc"][!SetVariable ImageTint "165,42,42"][!SetOptionGroup Colors String "#*ImageTint*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!RefreshGroup "MyComplimentarySkins"][!Redraw]
ImageTint=165,42,42
ToolTipText=Brown
User avatar
balala
Rainmeter Sage
Posts: 8369
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Complementary Colors

balala » February 1st, 2019, 11:11 am

Not sure I understand what you mean by
mattitta wrote:
February 1st, 2019, 2:51 am
balala no quotation marks
because I always use quotation marks. I did in the last posted code, as well as always. I'm a big "fan" of using quotation marks: https://forum.rainmeter.net/viewtopic.php?f=5&t=26350&p=137628&hilit=quote+enclose+option#p137628
Or you mean in options? There they're not needed, as you can read in the above link. But I don't think eclectic-tech would use them anywhere in options. So not sure at all...

Finally is everything alright? If it's not, please pack again the content of the whole Test Skin config and upload it again. Also lat me (us) know what should have to be going on and it doesn't yet.
mattitta
Posts: 14
Joined: January 26th, 2019, 3:17 am

Re: Complementary Colors

mattitta » February 2nd, 2019, 8:03 pm

Hello again with the code the way it is works great. I will be tweaking the look of the skin and add the rainRGB function so I can pick other colors. I'm going to make a skin to display album art as well and add media controls to it. I want to thank you both for everything you've showed and taught me, I'm going to try some things on my own for a while, helps keep this old mind fresh. eclectic-tech your triad color picker is a great idea if you could get the bugs out it would be even better than what I have for now, since I always use solid colors for my desktop. Once again thank you and good-bye for now but its good to know individuals like the two of you are here to help us.