HOME | DD

Published: 2014-05-17 13:22:48 +0000 UTC; Views: 11389; Favourites: 35; Downloads: 1376
Redirect to original
Description
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 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: 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 variables.inc 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 variables.inc 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 variables.inc, 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\#@#variables.inc). 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:
[LabelForText]
Meter=String
Text=Change the color of text
LeftMouseUpAction=[!WriteKeyValue Variables changedcolorvariable "NAMEOFYOURVARIABLE" "#@#variables-color.inc"][!WriteKeyValue Variables defaultcolor "#NAMEOFYOURVARIABLE#" "#@#variables-color.inc"][!Refresh]
[LabelForBackground]
Meter=String
Text=Change the color of background
LefMouseUpAction...
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 variables.inc (I suppose you already have it there and you store them in the Resources folder) but you will need to put variables-color.inc in the Resources folder and and put the @ Include2=#@#variables-color.inc 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 variables-color.inc in the Resources folder and edit the same line.)
Requirements:
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: rainmeter.net/ (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
Credits:
As I already said, it was inspired by 's RainRGB addon for Rainmeter. Also 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
Related content
Comments: 8
Squirrel-slayer In reply to ionstorm01 [2014-05-21 19:57:06 +0000 UTC]
Thank you very much - and for the fav too However, there will be update (hopefully till the end of the week) with editable width and height and possibility to enter the numeric value of the color
👍: 0 ⏩: 0
Squirrel-slayer In reply to Takara777 [2014-05-20 10:48:16 +0000 UTC]
Thank you very much - and for the fav too
👍: 0 ⏩: 0
Squirrel-slayer In reply to Burnwell88 [2014-05-18 10:37:48 +0000 UTC]
You are wellcome, I didn't know what else could I do with it And thank you very much for the fav
👍: 0 ⏩: 1
Burnwell88 In reply to Squirrel-slayer [2014-05-19 09:48:38 +0000 UTC]
i will use your work in my new skin .... and i will credit you thx
👍: 0 ⏩: 1
Squirrel-slayer In reply to Burnwell88 [2014-05-19 10:33:27 +0000 UTC]
That is great Let me know if there are some troubles.
👍: 0 ⏩: 0