It is currently October 13th, 2024, 8:44 am

ColorPicker

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

Re: ColorPicker

Post by raiguard »

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: 22851
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ColorPicker

Post by jsmorley »

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: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: ColorPicker

Post by raiguard »

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: 22851
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ColorPicker

Post by jsmorley »

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: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: ColorPicker

Post by raiguard »

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: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: ColorPicker

Post by raiguard »

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: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: ColorPicker

Post by raiguard »

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
XxNINJAxX5
Posts: 2
Joined: October 2nd, 2023, 6:29 pm

Re: ColorPicker

Post by XxNINJAxX5 »

I found this to be really useful unless you talked about it and I did not understand read all the pages I have two monitors when I have the color picker on screen 2 and middle mouse click it to minimize it it goes to screen 1 is there a way to make it minimize and stay on screen 2 not go to the bottom left corner of screen 1 I have tried to make the display monitor the main on it though rainmeter that did not work
User avatar
Yincognito
Rainmeter Sage
Posts: 8442
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ColorPicker

Post by Yincognito »

XxNINJAxX5 wrote: October 2nd, 2023, 6:49 pm I found this to be really useful unless you talked about it and I did not understand read all the pages I have two monitors when I have the color picker on screen 2 and middle mouse click it to minimize it it goes to screen 1 is there a way to make it minimize and stay on screen 2 not go to the bottom left corner of screen 1 I have tried to make the display monitor the main on it though rainmeter that did not work
I believe that keeping the minimized version of the skin on your 2nd monitor can be achieved by replacing the [!Move ...] bang from the OnRefreshAction option in Minimized.ini with the appropriate [!SetWindowPosition ...] according to your monitor. See the bang syntax at:
https://docs.rainmeter.net/manual/bangs/#Skin
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
XxNINJAxX5
Posts: 2
Joined: October 2nd, 2023, 6:29 pm

Re: ColorPicker

Post by XxNINJAxX5 »

Yincognito Tyvm that was helpful I am not the best at figuring out the editing but I am learning bit by bit here and there you was very helpful ty