It is currently October 22nd, 2021, 10:37 am

ColorPickerUI [v1.0.0]

Skins that control functions in Windows or Rainmeter
User avatar
death.crafter
Posts: 1058
Joined: April 24th, 2021, 8:13 pm

ColorPickerUI [v1.0.0]

Post by death.crafter »

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:
Screenshot 2021-06-03 141143.png


How to use:
  1. 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:
ColorPickerUI.zip
Example skin:
ColorPickerUI_1.00.rmskin

Plugins required:(included in zip inside Plugins folder)
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.
You do not have the required permissions to view the files attached to this post.
from the Realm of Death
My Current Desktop