It is currently November 15th, 2019, 3:54 am

ColorPicker

Post your work-in-progress and completed skins to share and discuss.
User avatar
raiguard
Posts: 643
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: ColorPicker

raiguard » April 5th, 2019, 3:55 am

jsmorley wrote:
April 4th, 2019, 11:14 pm
Cool!

The only thing I would ask is that if you modify the HSBLib.lua library, you rename it before you distribute it, so we don't have a bunch of conflicting versions floating around.
Sure thing. I plan to combine a color script that I made a while ago with HSBLib, and I'll be sure to differentiate it.

Now I need some help. I was wondering why you used a giant image for the color spectrum, rather than a gradient on a shape meter. So I went to try and recreate a RainRGB-style picker with Shapes, and it seems like you can't create the right kind of gradient that kind of color picker requires. Is there not a way to replicate RainRGB's picker without resorting to something like MagickMeter?

If not I might resort to something simpler, like individual HSB sliders that react as you drag them. I just want something more compact than what ColorPicker currently offers.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
jsmorley
Developer
Posts: 19710
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ColorPicker

jsmorley » April 5th, 2019, 1:06 pm

Yeah, you can't recreate that pallet with gradients in Shape meters, at least not without thousands of Shape meters. That is why I went with the image. It could be a smaller image of course, it doesn't matter a bit what image you use, the tool just picks the color by pixel.
User avatar
raiguard
Posts: 643
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: ColorPicker

raiguard » April 5th, 2019, 1:17 pm

jsmorley wrote:
April 5th, 2019, 1:06 pm
Yeah, you can't recreate that pallet with gradients in Shape meters, at least not without thousands of Shape meters. That is why I went with the image. It could be a smaller image of course, it doesn't matter a bit what image you use, the tool just picks the color by pixel.
I see, thanks for the info. I'll see what I can do.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
jsmorley
Developer
Posts: 19710
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ColorPicker

jsmorley » April 5th, 2019, 1:21 pm

You could just have several meters that display small squares of the primary colors, and then fine tune from there with something like the RGB/HSB "scrubbers" I have. I think you need some reference for the user as a starting point though. Even that spectrum image was only intended as a starting point, or a "rough" color selection, as it's hard to click on the exact pixel that is the color you want.

I'm skeptical of "sliders" in Rainmeter, as for something that is going to need to be this "exact", it is very difficult to get it to not have any "lag" at all in it. That is why I went with the scrolling "scrubbers" instead of having to have a skin with a very low Update and fight with lag on mouse movements.

In addition, having six sliders is going to have its own real-estate implications. You have to be able to slide in all of the R-G-B and H-S-B dimensions. RGB and HSB should both be in any decent color picker in my view. RGB is how many folks think of mixing up colors. Nobody thinks in terms of degrees of hue. HSB is better in some ways for fine tuning, as saturation and brightness are how you keep a base color, but alter it.

This is why I actually really like the functionality of ColorPicker, it works exactly as I think it should. The design, the look of it, I would readily grant could be better. I'm no designer... Nothing is set in concrete with ColorPicker though, it's just meters... Once you wrap your head around how it works, the possible ways to design it differently are pretty endless.

The real key to it is the CursorColor plugin. The rest is usability and design considerations. I'm a firm believer that form follows function though.
User avatar
raiguard
Posts: 643
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: ColorPicker

raiguard » April 5th, 2019, 2:55 pm

jsmorley wrote:
April 5th, 2019, 1:21 pm
You could just have several meters that display small squares of the primary colors, and then fine tune from there with something like the RGB/HSB "scrubbers" I have. I think you need some reference for the user as a starting point though. Even that spectrum image was only intended as a starting point, or a "rough" color selection, as it's hard to click on the exact pixel that is the color you want.

I'm skeptical of "sliders" in Rainmeter, as for something that is going to need to be this "exact", it is very difficult to get it to not have any "lag" at all in it. That is why I went with the scrolling "scrubbers" instead of having to have a skin with a very low Update and fight with lag on mouse movements.

In addition, having six sliders is going to have its own real-estate implications. You have to be able to slide in all of the R-G-B and H-S-B dimensions. RGB and HSB should both be in any decent color picker in my view. RGB is how many folks think of mixing up colors. Nobody thinks in terms of degrees of hue. HSB is better in some ways for fine tuning, as saturation and brightness are how you keep a base color, but alter it.

This is why I actually really like the functionality of ColorPicker, it works exactly as I think it should. The design, the look of it, I would readily grant could be better. I'm no designer... Nothing is set in concrete with ColorPicker though, it's just meters... Once you wrap your head around how it works, the possible ways to design it differently are pretty endless.

The real key to it is the CursorColor plugin. The rest is usability and design considerations. I'm a firm believer that form follows function though.
My plan is to have the spectrum picker as the primary focus, with RGB/HSL (you will be able to choose which) sliders/scrubbers below it. I'm going to use NighthawkSLO's Mouse plugin to allow you to drag the sliders and drag on the spectrum itself. If this ends up being too performance-heavy I'll do something simpler, but in my testing I've found that the plugin is fairly performance-light, so long as you're not trying to solve planck's constant on every update. Plus, it doesn't require you to set a low update divider.

I'm no designer either, but I like to think that I've learned a thing or two over the last few years. :D

Edit: I just realized! It might be possible to create a RainRGB-esque picker using ColorMatrix. I've never even looked at it before so I'll have to learn how it works from scratch, but I have hope!
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
raiguard
Posts: 643
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: ColorPicker

raiguard » April 6th, 2019, 12:28 am

colorpickerplus_1.gif
PLEASE NOTE THAT THE VERY UNEVEN COLOR SMOOTHING IS DUE TO MY GIF PROGRAM, NOT THE SKIN ITSELF


So, progress! Everything is draggable, and it works remarkably well! There are just a few issues though...

1. When first clicking one of the scrubbers, they all flash, and sometimes weird values are set
2. Scrubbing the saturation or brightness sliders will randomly change the other two sliders, sometimes resetting them to zero!

The .RMSKIN is attached. Any ideas?

EDIT: Also, is there a way to make custom cursors invert the colors behind them, like the default cross cursor does? I have an alternate cursor that looks much nicer, but is always black so is hard to see when you get to dark colors.
You do not have the required permissions to view the files attached to this post.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
raiguard
Posts: 643
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: ColorPicker

raiguard » April 7th, 2019, 3:12 am

Hey jsmorley, just thought I'd let you know that I solved my problems. The issues were being caused by my being lazy. The way it was working was when I changed an HSB value, it would immediately convert the new HSB value back to RGB and update the variable. Then the script would just use its generic RGB to HSL logic to set the slider values.

This was causing drift when the script wouldn't 100% accurately convert HSB -> RGB -> HSB, which was the root of my problem. To fix it, I just had to redesign the entire script... but it works now, and has even more features!

Anyway, if I have any other questions, I'll create a separate thread. Thanks!
2019-04-06 21_33_07.png
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017