I would like some help with something related to chameleon plugin that I am working on.
I think it would be easiest for me to post the code, and share my objective, rather than just the objective.
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
; Chameleon Measures
[ChameleonDesktop]
Measure=Plugin
Plugin=Chameleon
Type=Desktop
[AverageLight]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Average
RegExp="(?siU)\[Variables\]\r\nColor1=(.+50*),(.+50*),(.+50*)
OnChangeAction=[!UpdateMeasureGroup Luminance]
[AverageDark]
Measure=Plugin
Plugin=Chameleon
Parent=ChameleonDesktop
Format=Dec
Color=Average
RegExp="(?siU)\[Variables\]\r\nColor1=(.-50*),(.-50*),(.-50*)
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 "[AverageDark]"][!UpdateMeter *][!Redraw]
IfFalseAction=[!SetVariable Color1 "[AverageLight]"][!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=(14*#Scale#)
X=(340*#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=[Average]
FontSize=(14*#Scale#)
X=(340*#Scale#)
Y=(120*#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
[MeterDate]
Meter=String
MeasureName=MeasureDate
StringAlign=Center
StringCase=Upper
FontFace=Quicksand
FontColor=#Color1#
FontSize=(14*#Scale#)
X=(340*#Scale#)
Y=(75*#Scale#)
Text="%1"
AntiAlias=1
DynamicVariables=1
There are 2 underlined sections of the code which I stole from @jsmorley in: https://forum.rainmeter.net/viewtopic.php?t=11185
EDIT: the lines weren't underlined. - the two lines were:
RegExp="(?siU)\[Variables\]\r\nColor1=(.-50*),(.-50*),(.-50*)
and
RegExp="(?siU)\[Variables\]\r\nColor1=(.+50*),(.+50*),(.+50*)
but me being new to rainmeter like I am, I thought I could just add + signs after the variables were there.
the goal is to check if the lumiance of the background is dark, and increase the brightness of the text if it is, and vice versa if it is dark.
However, nothing happens.
The clock will show up with the average color of the background, but there just isn't enough contrast for me. - and the colors aren't being added to the extracted RGB.
Any help is greatly appreciated!
Thank-You in advance.