It is currently March 28th, 2024, 3:43 pm

ColorMatrix Power Battery

Skins that monitor system information
Post Reply
User avatar
AlC
Posts: 329
Joined: June 9th, 2011, 6:46 pm

ColorMatrix Power Battery

Post by AlC »

Hey Guys

Just wanted to share a skin that I made when I played a bit with ColorMatrix.
It's battery, which change his color to the current battery condition (From Green to Yellow to Red).

There are 2 skins:
One skin (ColorMatrixPower), which using the Power plugin (for Laptops).
The other skin (ColorMatrixCounter), which using a counter (100%->0%) to demonstrate the skin on a non-laptop.

Note:
I tested ColorMatrixPower shortly on my father's laptop, (which is old and has some problem with the battery) and at his laptop it worked well. So Report bugs.

Code:
[Rainmeter]
Update=1000

[Variables]
Power=[mPowerCalc]

;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[mPower]
Measure=Plugin
Plugin=Plugins\PowerPlugin.dll
PowerState=PERCENT

[mPowerCalc]
Measure=Calc
Formula=mPower
IfBelowValue=51
IfBelowAction=!Execute [!RainmeterEnableMeasure PowerCalcDown]
IfAboveValue=50
IfAboveAction=!Execute [!RainmeterDisableMeasure PowerCalcDown]

;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[Background]
Meter=IMAGE
ImageName=#CURRENTPATH#Bat.png
X=0
Y=0
W=256
H=256

[Foreground]
Meter=IMAGE
ImageName=#CURRENTPATH#BatFull.png
X=86
Y=32
H=(392/2)
W=(214/2)
ColorMatrix1=[PowerCalcRed]; 0; 0; 0; 0
ColorMatrix2=0; [PowerCalcGreen]; 0; 0; 0
ColorMatrix3=0; 0; 0; 0; 0
ColorMatrix4=0; 0; 0; 1; 0
ColorMatrix5=0; 0; 0; 0; 1
DynamicVariables=1
;R
;G
;B
;A
[PowerSrting]
Meter=STRING
MeasureName=mPowerCalc
X=120
Y=112
W=16
H=16
FontColor=255,255,255,255
Text="%1 %"

;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[PowerCalcUp]
Measure=Calc
Formula=#Power#/50
InvertMeasure=1
DynamicVariables=1

[PowerCalcRed]
Measure=Calc
Formula=#Power#<50?1:1+PowerCalcUp
InvertMeasure=0
DynamicVariables=1

[PowerCalcDown]
Measure=Calc
Formula=#Power#/50
InvertMeasure=0
DynamicVariables=1
Disabled=1

[PowerCalcGreen]
Measure=Calc
Formula=#Power#>49?1:PowerCalcDown
InvertMeasure=0
DynamicVariables=1
The Battery Icon is from PRATH33K (little changes from me). Check this -> http://browse.deviantart.com/customization/icons/os/?q=battery#/d319p9l

Have fun with changing the the colors/or maybe the transparency ;-)
Attachments
ColorMatrix.zip
ColorMatrix.zip
(133.88 KiB) Downloaded 183 times
Preview.png
Preview
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: ColorMatrix Power Battery

Post by smurfier »

That is a much more simple approach then what I used. I'm still trying to figure color matrix out.
User avatar
AlC
Posts: 329
Joined: June 9th, 2011, 6:46 pm

Re: ColorMatrix Power Battery

Post by AlC »

Yes I understand you well, I don't really understand the whole ColorMatrix. Only the easy things like this. :)
But I like it, when the Battery has for every single percent an own color. And not the normal things like IfBelowValue=30 ...then Change Color to red
Even if I don't have a laptop :D

Tip: If you wanna do something with ColorMatrix

Open an image editor (like Gimp), double click on the choosen color, then you can change the color.
Look at the values for R G B.

In my case I did a little notice for me:

Bat.Green R 0 G 1
Bat.Green/Yellow R 0,5 G 1
Bat.Yellow R 1 G 1
Bat.Red/Yellow R 1 G 0,5
Bat.Red R 1 G 0
Post Reply