Can we identify Color or image color using Uipath?

I would assume that Marketplace activity just uses vb.net to get the color of a pixel.

1 Like

It’s fairly simple. Note that there is no such thing as “image color” - an image is a collection of pixels. Individual pixels have a color (RGB value), and you can get the color of a pixel.

Create a variable of type System.Drawing.Bitmap (myBMP)
Create a variable of type UiPath.Core.Image (screenshot)

Use Take Screenshot (or some other method) to load an image into “screenshot”:
image
image

(I designated no target so I just get the entire screen)

Then use an Assign to convert the screenshot into myBMP:
image

Then you can easily get the color from pixel coordinates within the image:
image

Results:
image

There are lots of properties, including .R .G and .B to get the individual RGB values:

image

1 Like

When I follow each of these steps, it tells me - Parameter must be positive and < Width. Can you tell me what I am doing wrong?

What do you have for the parameters of myBMP.GetPixel?

I believe this is what you are asking… in my Log Message I put myBMP.GetPixel(50,50).

Let me now if that is what you are asking.

Unable to download the color detector activities,
its showing as not compatible version for windows projects.

Kindly suggest/advise.

It’s fairly simple to do it yourself.