Can we identify Color or image color using Uipath?

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