PDA

View Full Version : RGB and HSV Sliders (ZB3.5r2)


toddp
09-30-09, 01:46 AM
A set of sliders to adjust RGB and HSV. I tacked them to the bottom of the Color menu. Look for "RGB HSV Sliders".

Hopefully the sliders are self-explanatory.

Couple of quirks to keep in mind:



Hit the "Update RGB" button when you first open the slider submenu.
Hit the "Update RGB" button when you change the active color with anything other than the sliders in the submenu.
To load the plugin every time you launch ZB:

Unzip the download.
Place "rgbhsv_sliders.zsc" in the "ZStartup\ZPlugs" folder.
To load the plugin in your current session:

Unzip the download.
Load "rgbhsv_sliders.zsc" from the "ZScript:Load" button.
And, yes, I know there are existing RGB sliders and a plethora of swatch based selectors in the "Color:Modifiers" submenu. I just wanted something simple.



I've included the source code so you can make your own edit.



-Todd

ancomic
09-30-09, 05:21 AM
Good.
Thank you.
.

Doqpelgänger
10-06-09, 05:20 PM
great! HSV sliders!!

alannoon
10-26-09, 08:25 PM
This is great, thanks!

I did a bit of hacking in the script and changed the slider width so I could embed them nicely in the left side of the workspace under the color picker.

toddp
10-26-09, 10:18 PM
alannoon - What a great idea. Don't know why I didn't think of that in the first place.

alannoon
10-27-09, 04:11 AM
:D
Just and FYI: I made the sliders 80 units wide, and they fit in that little shelf area nicely.

BUT... doing so makes the layout in color palette pretty ugly. I don't know zscript well enough to organize it.

marcus_civis
10-27-09, 05:38 AM
There are two ways of specifying the button or slider size in zscript: values above 1 will be pixel dimensions; fractional values up to 1 are proportional to full palette width. So to fit the sliders neatly on the left shelf, whatever the button size is set to, you'd use a width value of .5.

HTH,

toddp
10-27-09, 10:46 AM
alannoon and marcus_civis - Thanks for the idea and pointers.

Based on alannoon and marcus_civis's suggestions, I've made a new script with a button and sliders to be half of a palette's width. This is the ideal size to fit into the small left hand palette ( thanks again ). I've also relocated the buttons to the "Zplugin" menu.

To get the sliders in the left hand menu:


Turn on the custom UI: Preferences -> Custom UI -> Enable Customize
Press and hold control, drag and drop the button and sliders ( one by one ) to the correct location.
Turn off custom UI.
Save the UI: Preferences -> Config -> Save Ui
There may be a better method to get the sliders in the left hand menu, but I am unsure of how to place them in that location via zscript. Also, since they are designed to be half size and to be placed in the left hand menu, the layout in the Zplugin menu is ugly ( as alannoon noted ).