What I am trying to do is make a custom gradient since for Roundline Meters you can't gradient the lines, only the background. I'm curious though if I can have Color1=rr,gg,bb,aa style variables or if I will have to do Color1R, Color1G, etc. as I have done in the example below. My assumption is that I will indeed have to do this for each color.
For reference, I made code that actually fully does the gradient including working with a transition delay.
Code: Select all
[Rainmeter]
Update=100
[Variables]
; Color 1
r1=0
g1=255
b1=0
a1=255
; Color 2
r2=255
g2=0
b2=0
a2=255
; Delay determines when the meter starts to chage colors
fDelay=0.75
; DelayJump determines if it slowly gradiates from Color1 to Color2,
; or if it jumps from Color1 to where it should already be gradiated from Colo1.
; Basically, 0 = smooth, 1 = drastic change
DelayJump=0
; Produce Data that is between 0.0 and 1.0
[Data]
Measure=Calc
Formula=(Counter % 100)/100
MaxValue=100
; Determine the normalization value
[NormalizationVal]
Measure=Calc
Formula= ( ([Data] < #fDelay#) ? 0 : ((#DelayJump# = 1) ? [Data] : 1-(1-[Data])/(1-#fDelay#) ) )
DynamicVariables=1
; Calculate the RGBa values respectively.
[rVal]
Measure=Calc
Formula=CEIL( (1-[NormalizationVal])*#r1# + ([NormalizationVal]*#r2# ))
DynamicVariables=1
[gVal]
Measure=Calc
Formula=CEIL( (1-[NormalizationVal])*#g1# + ([NormalizationVal]*#g2# ))
Formula=255
DynamicVariables=1
[bVal]
Measure=Calc
Formula=CEIL( (1-[NormalizationVal])*#b1# + ([NormalizationVal]*#b2# ))
DynamicVariables=1
[aVal]
Measure=Calc
Formula=CEIL( (1-[NormalizationVal])*#a1# + ([NormalizationVal]*#a2# ))
DynamicVariables=1
; Display Color Info for testing
[DisplayText]
Meter=STRING
MeasureName=Data
X=0
Y=0
FontColor=[rVal],[gVal],[bVal],[aVal]
FontFace=Trebuchet MS
FontSize=14
StringEffect=Shadow
FontEffectColor=0,0,0,255
AntiAlias=1
Text=D: %1
NumOfDecimals=2
DynamicVariables=1
[DisplayText2]
Meter=STRING
MeasureName=rVal
MeasureName2=gVal
MeasureName3=bVal
MeasureName4=aVal
X=0
Y=0R
FontColor=[rVal],[gVal],[bVal],[aVal]
FontFace=Trebuchet MS
FontSize=14
StringEffect=Shadow
FontEffectColor=0,0,0,255
AntiAlias=1
Text=R: %1#CRLF#G: %2#CRLF#B: %3#CRLF#A: %4
NumOfDecimals=0
DynamicVariables=1