ColorPickerUI
I made a custom color picker for my skin and thought I may as well share it. The main reason being choosing the alpha value.Here is a screenshot and video:
How to use:
- You have to paste the following Lua measure inside your code somewhere or include the inc file inside the zip provided below using @include.
Code: Select all
[ColorPickerUI] Measure=Script ScriptFile=#ROOTCONFIGPATH#ColorPickerUI\Resources\Scripts\ColorPickerUIActivator.lua
- Then you just have to extract the zip to your skin folder( or copy the ColorPickerUI folder if you are using the example skin). You can delete the inc file if you don't intend to use it.
- To change a color variable, just use the lua command below:
Code: Select all
LeftMouseUpAction=[!CommandMeasure ColorPickerUI "Change('variableName', '[&ColorPickerUI:sub('fileName')]', '[&ColorPickerUI:sub('refreshConfig1')]', '[&ColorPickerUI:sub('refreshConfig2')]', '[&ColorPickerUI:sub('refreshConfig3')]')"] # variableName :: name of the color variable you want to change # fileName :: path to the file the variable is located. # refreshConfigN :: name of the configs to refresh(if you want to add more than 3 you have to change the lua a little which won't be that hard) # **NOTE: The [&ColorPickerUI:sub('someString')] is vital. What this function does is replace the single backslashes(\) with double backslashes(\\) # **which is necessary.
Explanation with example:
Code: Select all
[Rainmeter]
Update=-1
AccurateText=1
[Variables]
SolidColor=74,210,134
[ColorPickerUI]
Measure=Script
ScriptFile=#ROOTCONFIGPATH#ColorPickerUI\Resources\Scripts\ColorPickerUIActivator.lua
[Text]
Meter=String
FontFace=Segoe UI Bold
FontSize=20
FontColor=FFFFFE
AntiAlias=1
Text= Color is [#SolidColor]
SolidColor=[#SolidColor]
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LeftMouseUpAction=[!CommandMeasure ColorPickerUI "Change('SolidColor','[&ColorPickerUI:sub('[#ROOTCONFIGPATH]ColorPickerUIExample.ini')]','[&ColorPickerUI:sub('[#CURRENTCONFIG]')]')"]
# Here SolidColor is the color I want to change.
# So I am using [#ROOTCONFIGPATH]\ColorPickerUIExample.ini.
# Here I have to refresh the current config so I am using [#CURRENTCONFIG]. Let I had to refresh another skin say "MyOtherSkin\MyOtherSubSkin"
# The command would have become:
# [!CommandMeasure ColorPickerUI "Change('SolidColor', '[&ColorPickerUI:sub('[#ROOTCONFIGPATH]ColorPickerUIExample.ini')]', '[&ColorPickerUI:sub('[#CURRENTCONFIG]', '[&ColorPickerUI:sub('MyOtherSkin\MyOtherSubSkin')]')
Zip: Example skin:
Plugins required:(included in zip inside Plugins folder)
- CursorColor by Jeffrey Morley
- Mouse by NighthawkSLO
I know this is an inefficient way of taking arguments but this all I can come up with. :P
Well even in an one in a million chance of you using it, you just have to replace the strings, so I guess it's not that bad.