Exactly, folks.
Which is why I'll share (hopefully) the final version of my "upgraded" / "updated" / whatever you want to call it Color Wheel, which integrates the stringification of setting up the R,G,B,A type of variables as well:
Code: Select all
[Variables]
; Color Array (set it to a "<ColorNumber>:<Red>,<Green>,<Blue>,<Alpha>;" enumeration)
Colors="0:255,0,0,255;1:255,0,255,255;2:0,0,255,255;3:0,255,255,255;4:0,255,0,255;5:255,255,0,255;6:255,0,0,255;"
; Maximum Value (decrease to speed up the transition, decrease to slow it down)
Range=384
; Value's Step (decrease to slow down the transition, increase to speed it up; negative values to transition backwards)
VStep=1
[Rainmeter]
Update=25
DynamicWindowSize=1
AccurateText=1
---Measures---
[SetRGBA]
Measure=String
String=#Colors#
UpdateDivider=-1
RegExpSubstitute=1
Substitute="(?U)(.+):(.+),(.+),(.+),(.+);":"[!SetVariable R\1 \2][!SetVariable G\1 \3][!SetVariable B\1 \4][!SetVariable A\1 \5]","(\d+)(\s+\S+\])$":"\1\2[!SetVariable IdMax \1]","(?U)^(\[.+\s+(\S+)\]\[.+\s+(\S+)\]\[.+\s+(\S+)\]\[.+\s+(\S+)\])":"[!SetVariable R \2][!SetVariable G \3][!SetVariable B \4][!SetVariable A \5]\1"
OnUpdateAction=[SetRGBA]
[Value]
Group=ColorGroup
Disabled=1
Measure=Calc
Formula=((#Range#+Value+#VStep#)%#Range#)
OnUpdateAction=[!SetVariable Interval (([#Range]+1)/[#IdMax])][!SetVariable SIndex (Trunc([Value]/(([#Range]+1)/[#IdMax])))][!SetVariable EIndex (Trunc([Value]/(([#Range]+1)/[#IdMax]))+1)]
DynamicVariables=1
[Color]
Group=ColorGroup
Disabled=1
Measure=Calc
OnUpdateAction=[!SetVariable R ([#R[#SIndex]]+(([Value]-[#SIndex]*[#Interval])/[#Interval])*([#R[#EIndex]]-[#R[#SIndex]]))][!SetVariable G ([#G[#SIndex]]+(([Value]-[#SIndex]*[#Interval])/[#Interval])*([#G[#EIndex]]-[#G[#SIndex]]))][!SetVariable B ([#B[#SIndex]]+(([Value]-[#SIndex]*[#Interval])/[#Interval])*([#B[#EIndex]]-[#B[#SIndex]]))][!SetVariable A "255"][!UpdateMeter "Shape"][!Redraw]
RegExpSubstitute=1
Substitute="^.*$":"#R#,#G#,#B#,#A#","\.\d+":"","(\d+)":" \1","[ \d]*([ \d]{3})":"\1"," ":" "
DynamicVariables=1
---Meters---
[Shape]
Meter=Shape
Shape=Rectangle 0,0,200,100,12 | StrokeWidth 0 | Stroke Color 255,255,255,255 | Fill Color #R#,#G#,#B#,#A#
MouseScrollDownAction=[!SetVariable VStep -1][!EnableMeasureGroup ColorGroup][!UnpauseMeasureGroup ColorGroup][!UpdateMeasureGroup ColorGroup][!PauseMeasureGroup ColorGroup][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseScrollUpAction=[!SetVariable VStep 1][!EnableMeasureGroup ColorGroup][!UnpauseMeasureGroup ColorGroup][!UpdateMeasureGroup ColorGroup][!PauseMeasureGroup ColorGroup][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseUpAction=[!UnpauseMeasureGroup ColorGroup][!ToggleMeasureGroup ColorGroup][!SetVariable R #R0#][!SetVariable G #G0#][!SetVariable B #B0#][!SetVariable A #A0#][!UpdateMeasureGroup ColorGroup][!UpdateMeter #CURRENTSECTION#][!Redraw]
MiddleMouseUpAction=[!TogglePauseMeasureGroup ColorGroup]
DynamicVariables=1
[Text]
Meter=STRING
X=([Shape:W]/2)r
Y=([Shape:H]/2)r
W=([Shape:W])
H=([Shape:H])
FontFace=Tahoma
FontColor=255,255,255,255
FontSize=10
FontWeight=700
AntiAlias=1
StringAlign=CenterCenter
StringEffect=Shadow
FontEffectColor=0,0,0,255
Text="TRANSITION: Color Wheel#CRLF#DIRECTION: #VStep##CRLF#COLOR: [Color]#CRLF#TRANSITION UPDATES: #Range#"
DynamicVariables=1
As you can see, I made my own code shorter using that technique too. Now I'm finally happy with the result.