It is currently March 28th, 2024, 7:08 pm

ColorPickerPlus 1.1.0

Skins that control functions in Windows or Rainmeter
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

ColorPickerPlus 1.1.0

Post by raiguard »

2019-05-31 22_49_22-D__Caleb_Development_Rainmeter_Testbench_Skins_ModernGadgets_Settings_ColorPicke.png
ColorPickerPlus is an advanced color picker built entirely in Rainmeter. It is designed both to be used as a standalone tool for skin developers, and as a method of allowing users of your suite to customize your suite's color options. The skin is entirely portable, so you can just copy the ColorPickerPlus folder into your suite and it will work out-of-the-box with no issues (assuming that you have the necessary plugins, of course!)

The skin is designed to be as extensible as possible, and includes detailed documentation of the skin code. The skin also includes instructions for integrating the picker into your own suite.

REQUIRES RAINMETER 4.3 OR NEWER
REQUIRES .NET FRAMEWORK 4.5 OR NEWER

Download latest release (v1.1.0)
Older versions

ColorPickerPlus on GitHub

Features
- Draggable HSB and RGB sliders
- Use the mouse wheel for fine-tuning
- Pick a color from the color spectrum
- Manually input an RGB or HEX color string
- Use the eyedropper tool to pick a color from anywhere on your screen, using the arrow keys for pixel-perfect selection
- Minimize to the corner of your desktop to keep it handy, but unobstrusive
- Copy RGB HSB, or HEX string to clipboard
- Configurable finish action for integrating into a suite

Attributions
ColorPicker by jsmorley
CursorColor plugin by jsmorley
Mouse plugin by NighthawkSLO
HotKey plugin by Brian
VectorConverter by theAzack9
NirCMD by NirSoft
FontAwesome by FortAwesome

Implementing ColorPickerPlus
If you wish to implement ColorPickerPlus as a color picker for your suite, simply copy the ColorPickerPlus skins folder and place it somewhere in your suite's skins folder. Then create a meter that, when clicked, will activate the skin:

LeftMouseUpAction=[!ActivateConfig "#CURRENTCONFIG#\ColorPickerPlus" "ColorPickerPlus.ini"]

You will also want to configure baseColor and finishAction as well. A common practice might be to set baseColor to the current value of the color you're changing, and set finishAction to write the resulting color into an external .INC file.

Code: Select all

; To incorporate ColorPickerPlus into your suite, you can either change these options directly, or you can use !WriteKeyValue bangs from another skin to change these values.
; This value determines the starting color that will be compared to in the color preview
baseColor=194,0,223
; This value determines what will happen when you click the "Save" icon. Color values are accessed through inline LUA, using the syntax [&MeasureScript:GetColor('cur_rgb')]. Available colors are:
; 'cur_r', 'cur_g', 'cur_b' - individual rgb components
; 'cur_rgb' - the current RGB string (r,g,b)
; 'cur_hue', 'cur_sat', 'cur_bri' - individual HSB values as floats (0-1)
; 'cur_hsb' - current HSB values as floats (0-1), separated by commas (h,s,l)
; 'disp_hue', 'disp_sat', 'disp_bri' - current HSB values formatted to make sense to humans (degrees for hue, percentage for sat and bri)
; 'disp_hsb' - the previous values formatted into a comma-separated string (deg,%,%)
; 'cur_hex' - the current RGB value in hexadecimal format (FFFFFF)
; There are some other values that you could access, if for some reason you wanted to. To see what colors you can retrieve, study the ColorPickerPlus.lua script.
finishAction=[!WriteKeyValue Variables color1 "[&MeasureScript:GetColor('cur_rgb')]" "#ROOTCONFIGPATH#Settings.inc"]
Here is an example skin demonstrating how you could implement ColorPickerPlus:
ColorPickerPlus_Demo_1.1.0.rmskin

Changelog:
v1.1.0 - 2019-05-31
- Added ability to close the eyedropper by pressing escape
- Converted all icons to shape meters
- Removed FontAwesome icon font
- Reduced flickering upon skin refresh

v1.0.0 - 2019-04-14
- Initial release
You do not have the required permissions to view the files attached to this post.
Last edited by raiguard on June 1st, 2019, 4:58 am, edited 1 time in total.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
soyelrafa
Posts: 96
Joined: March 1st, 2017, 3:09 pm

Re: ColorPickerPlus 1.0.0

Post by soyelrafa »

This looks amazing, thanks you!
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: ColorPickerPlus 1.1.0

Post by raiguard »

The skin has been updated to v1.1.0. Changes include converting all icons to shape meters (getting rid of the icon font more than halved the file size of the whole thing!), and various fixes for a more pleasant experience. Grab the new version from the link above!
v1.1.0 - 2019-05-31
- Added ability to close the eyedropper by pressing escape
- Converted all icons to shape meters
- Removed FontAwesome icon font
- Reduced flickering upon skin refresh
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: ColorPickerPlus 1.1.0

Post by eclectic-tech »

Great additions! Especially like the icon conversions to shape meters, well done! :thumbup:
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ColorPickerPlus 1.1.0

Post by jsmorley »

This is really nicely done, and well polished.
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: ColorPickerPlus 1.1.0

Post by raiguard »

Thanks! :D
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
mmxiv
Posts: 18
Joined: February 14th, 2021, 5:48 pm

Re: ColorPickerPlus 1.1.0

Post by mmxiv »

Hullo Raiguard! Great tool, really. I would like to ask you something about this great tool. Namely, seems that you have configured this tool only for settings of one skin per settings page. But can you please clarify how to configure it to work if we have color settings for 2 or more skins on a page.
For example, all the settings that are under [MeasureSettingsScript] forks fine, but if I add a similar measure with another name for other skins on the settings page, it won't refresh the settings part.

Do you have any example, advice how to?
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: ColorPickerPlus 1.1.0

Post by SilverAzide »

mmxiv wrote: February 15th, 2021, 11:29 pm Hullo Raiguard! Great tool, really. I would like to ask you something about this great tool. Namely, seems that you have configured this tool only for settings of one skin per settings page. But can you please clarify how to configure it to work if we have color settings for 2 or more skins on a page.
For example, all the settings that are under [MeasureSettingsScript] forks fine, but if I add a similar measure with another name for other skins on the settings page, it won't refresh the settings part.

Do you have any example, advice how to?
Raiguard is the best person to respond, but if I understand your question, you can simply create multiple script measures to handle different skins and settings. Something like:

Code: Select all

[MeasureSettingsScript1]
Measure=Script
ScriptFile=#@#Settings.lua
SettingsPath=#@#MySkinVariables.inc
ConfigPath=#ROOTCONFIG#\MySkin
ColorPickerConfig=#ROOTCONFIG#\Settings\ColorPickerPlus

[MeasureSettingsScript2]
Measure=Script
ScriptFile=#@#Settings.lua
SettingsPath=#@#SomeOtherSkinVariables..inc
ConfigPath=#ROOTCONFIG#\SomeOtherSkin
ColorPickerConfig=#ROOTCONFIG#\Settings\ColorPickerPlus
Just call whichever script measure you need. I didn't try this specifically, so just treat the above as a basic guide only.
Gadgets Wiki GitHub More Gadgets...