It is currently April 19th, 2024, 5:36 am

Searching for a plugin.

Get help with creating, editing & fixing problems with skins
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Searching for a plugin.

Post by kyriakos876 »

Hello everyone, is there any plugin that can tell what color is a specific pixel on my screen?

-Thanks in advance.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Searching for a plugin.

Post by balala »

kyriakos876 wrote:Hello everyone, is there any plugin that can tell what color is a specific pixel on my screen?
Depending on what you want to use it for, maybe the Chameleon plugin could help you? It's available here: https://forum.rainmeter.net/viewtopic.php?p=114867#p114867
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Searching for a plugin.

Post by kyriakos876 »

balala wrote:Depending on what you want to use it for, maybe the Chameleon plugin could help you? It's available here: https://forum.rainmeter.net/viewtopic.php?p=114867#p114867
Well I want to get it as a value in Rainmeter... for example, if (30,200) pixel is red, then do a specific action. I don't think I can do that with the chameleon plugin. Correct me if I'm wrong.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Searching for a plugin.

Post by balala »

kyriakos876 wrote:Well I want to get it as a value in Rainmeter... for example, if (30,200) pixel is red, then do a specific action. I don't think I can do that with the chameleon plugin. Correct me if I'm wrong.
No, I won't correct you. Probably you're right and can't do this with that plugin. Sorry...
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Searching for a plugin.

Post by fonpaolo »

Maybe ColorPicker...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Searching for a plugin.

Post by eclectic-tech »

kyriakos876 wrote:Well I want to get it as a value in Rainmeter... for example, if (30,200) pixel is red, then do a specific action. I don't think I can do that with the chameleon plugin. Correct me if I'm wrong.
A coordinate doesn't really explain what you want to detect...

Do you want to know what color your desktop is at a coordinate? If so, ImageMagick might help with that (and a lot of other image processes).

If you want to be able to point to an area or pixel and have that brought into your variables, I would look at an add-on JSMorley created "back in the Stone Age" that let's you pick an average 10x10 color anywhere on your screen.https://forum.rainmeter.net/viewtopic.php?p=28993#p28993

Or an Auto-It script that picks a single pixel by KreAcherhttps://forum.rainmeter.net/viewtopic.php?p=72581#p72581

If neither of these are what you are looking for, then I would look deeper into ImageMagick convert capabilities.

EDIT: fonpaolo's suggestion (or any color picker could work).
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Searching for a plugin.

Post by kyriakos876 »

eclectic-tech wrote:A coordinate doesn't really explain what you want to detect...

Do you want to know what color your desktop is at a coordinate? If so, ImageMagick might help with that (and a lot of other image processes).

If you want to be able to point to an area or pixel and have that brought into your variables, I would look at an add-on JSMorley created "back in the Stone Age" that let's you pick an average 10x10 color anywhere on your screen.https://forum.rainmeter.net/viewtopic.php?p=28993#p28993

Or an Auto-It script that picks a single pixel by KreAcherhttps://forum.rainmeter.net/viewtopic.php?p=72581#p72581

If neither of these are what you are looking for, then I would look deeper into ImageMagick convert capabilities.

EDIT: fonpaolo's suggestion (or any color picker could work).
I'll try those things out and see if I can work something out. If for some reason you still didn't understand:
Coordinates for the pixel I want to check-> 30,200 would be the pixel 30 pixels from the left and 200 pixels from the top. I want to check the color of that pixel. When the color becomes (for example) red (255,0,0) I want my skin to do (something) This should be something like:

Code: Select all

[MeasureColor]
Measure=Plugin
Plugin=SomePlugin
ColorAt=30,200

[MeasureAction]
Measure=Calc
IfCondition=([MeasureColor]== "255,0,0")
IfTrueAction=[!SetOption MeterAction SolidColor "0,0,0"][!Update]

[MeterAction]
Meter=Image
SolidColor=255,0,0
W=10
H=10
DynamicVariables=1
So this would change the color to black if the pixel at 30,200 becomes red.

NOTE: I want it to check the pixel on my monitor in general. Not on my background image, so if I move (for example) chrome over that pixel it would change the color to black.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Searching for a plugin.

Post by kyriakos876 »

UPDATE: I'm pretty sure ColorPicker can do what I want as I see in the Overlay.ini on the example skin, but I can't figure how to get the value of a set pixel on the screen without having to move my mouse.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Searching for a plugin.

Post by kyriakos876 »

After searching around, I don't think the plugin supports the check of a set place on my screen but only follows the mouse.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Searching for a plugin.

Post by eclectic-tech »

kyriakos876 wrote:After searching around, I don't think the plugin supports the check of a set place on my screen but only follows the mouse.
Auto-It has a function to do this...
Function Reference;;_WinAPI_GetPixel;;_WinAPI_GetPixel Retrieves the color value of the pixel at the specified coordinates #include <WinAPIGdi.au3> _WinAPI_GetPixel ( $hDC, $iX, $iY ) Parameters $hDC Handle to the device context. $iX The x-coordinate, in logical units, of the pixel to be examined. $iY The y-coordinate, in logical units, of the pixel to be examined. Return Value Success: The color of the pixel, in RGB. Failure: (-1).
Someone who is familiar with Auto-It may be able to provide more help, I am not that qualified in Auto-It coding... :p