Deviation Actions

Squirrel-slayer's avatar

ColorSetter for Rainmeter



So, I got a little bit crazy again when making my last suite for Rainmeter. I wanted to have there a possibility to change the color of the text, background etc. Of course, I have found brilliant RainRGB by :iconjsmorley: but I didn't want to use an external program... So I have made this ColorSetter. Obviously, it is more an utility for skin creators than for the ususal users but it can be easily implemented in any skin.

Edit: :iconexper1mental: had some nice nitpicky suggestions that led me to creation of ColorSetter Beta that will allow you also to enter the numeric value of the color but requires the 3.1 version of Rainmeter.

So, what can it do?
It will allow you to change any color defined in or create new one.
You can chose to set RGBA color with an alpha channel to set some transparency to the color, or only RGB color - this can be usefull if you have a rainmeter suite in one tone and with several defined colors with different transparencies; you can change only the main color and all other will change
(if you have for example variables
BlueColor=20,20,220 ; as the main color
BlueBackground=#BlueColor#,50 ; for soft backgrounds
BlueAnother=#BlueColor#,150 ; for bars and roundlines...)
It will remember the last edited color and will allow you to reverse the changes if you aren't satisfied (however, it will not allow you to "destroy" a new colour you have created).

How to work with it?
You will need a file where you store your clors and other stuff (if you don't understand using the external .inc files, you should reconsider using this). So, when you have that external, open ColorSetter (and ColorSetter-Aplha) for editing and put a path for your file to the first @Include in [Variables] section (idealy something like @ Include=#SKINSPATH#MySuiteFolder\ Then you just need to load the skin (RGB or RGBA, whichever you need), remember the name of your variable and put it in the "Change me" box (press ENTER!). If you are "editing" some color you already have created, the actual color should appear in the left part of the little box next to the "Chosen color:" label. Play with the tint, shade and alpha and click the "Apply new color" when you are done.
If you want to implement it in your own skin, and let the user to change the color, copy the code, adjust the positions etc... Obviously, you will not want the user to write there a name of some variable, so throw away the [InputColor] measure and [ChangedVariable] meter, you will not need those. However, you will still need to set the variable, so you cand create some new string meters for example and do something like this:

Text=Change the color of text
LeftMouseUpAction=[!WriteKeyValue Variables changedcolorvariable "NAMEOFYOURVARIABLE" ""][!WriteKeyValue Variables defaultcolor "#NAMEOFYOURVARIABLE#" ""][!Refresh]
Text=Change the color of background

Note that in the first bang there is a name of the variable - without the "#" - and in the second bang, there is the #variable# with "#". This is important for this skin to work. ... Of course, I have skipped some unimportant stuff in the example... Obviously, if you implement the ColorSetter in your own skin, you will not need to adjust the path for the (I suppose you already have it there and you store them in the Resources folder) but you will need to put in the Resources folder and and put the @ line at the end of the [Variables] section.

If you find the ColorSetter too big (it isn't small), open the ini file (ColorSetter.ini or ColorSetter-Alpha.ini), in the [Variables] section delete the semicolon on the begining of the line with ;colorsettersize=255 and write there a new value. (Or go to the in the Resources folder and edit the same line.)

It was created with 3.1. beta Rainmeter but I believe that 3.0.2 version (latest stable releas) should be able to work with it. You can get it here: (but I hope you alredy have it).
Doesn't need any special plugin... I don't understand them... or LUA scripting, so it is pure Rainmeter code:)

As I already said, it was inspired by :iconjsmorley:'s RainRGB addon for Rainmeter. Also :iconexper1mental: provided some constructive feedback and ideas to make it better.
It was ceated by me, so if you want to implement it in some your skins, don't forget to let me know and/or mention me in the credits, to keet good relationships:)
Join the community to add your comment. Already a deviant? Log In
ionstorm01's avatar
Very smart!  I like it!