It is currently March 28th, 2024, 8:15 pm

Color Blending with multiple scales

Discuss the use of Lua in Script measures.
hakshak
Posts: 6
Joined: February 23rd, 2015, 11:35 pm

Color Blending with multiple scales

Post by hakshak »

I've tried doing this natively without Lua and you can see that attempt here.

However, I couldn't get that to work, so I made this. It's along the same lines as this post, but I needed more flexibility.

Details are in the comments here.

Here's a look at what I am using it for:
Image
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Color Blending with multiple scales

Post by eclectic-tech »

I like what you have done, very nice! :thumbup:

In working with your example measure, I did encounter an error message caused by a missing parameter in the AlphaScale:

Code: Select all

[ExampleColorMeasure1]
Measure=Script
ScriptFile="BlendColor.lua"
MeasureToBlend=SomeMeasureWithMinMaxSet
RedScale=50,75,0,255|75,100,255,255
GreenScale=0,50,255,255|50,75,255,0
AlphaScale=0,50,64|50,100,64,255

'AlphaScale' line is missing the second value alpha range (all scales must have 4 parameters is the error)

Changed it to AlphaScale=0,50,64[color=#ff0000],64[/color]|50,100,64,255 and everything works as described.

Thanks for this option; hopefully the RM team can get the Clamp() issues resolved...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Color Blending with multiple scales

Post by jsmorley »

eclectic-tech wrote:Thanks for this option; hopefully the RM team can get the Clamp() issues resolved...
Fixed. Will be in the next beta, most likely tomorrow. We have a little something else we are just testing, so we held off the usual Sunday beta. Should be ready to go tomorrow.
hakshak
Posts: 6
Joined: February 23rd, 2015, 11:35 pm

Re: Color Blending with multiple scales

Post by hakshak »

eclectic-tech wrote:Changed it to AlphaScale=0,50,64[color=#ff0000],64[/color]|50,100,64,255 and everything works as described.
Thanks! Updated the gist.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Color Blending with multiple scales

Post by eclectic-tech »

Timely as always! ;-)

Thanks, I look forward to trying this out on some new skins...
And re-coding a few, in which I used a 'Rube Goldberg' approach to simulate!

Image