cancel
Showing results for 
Search instead for 
Did you mean: 

Identify font colour

GaneshGadhave
Level 3
Hello, I am automating one mainframe application in that I want to identify the color of particular text?how can I capture the text and identify the color of text?
6 REPLIES 6

John__Carter
Staff
Staff
Unfortunately the APIs BP uses to integrate with mainframes do not provide a means to detect colour. You'll have to use a Surface Automation technique to capture a sub-image of the characters and then use the Contains Colour function in the image VBO.

Hello John Thanks for your response,I have tried to use Surface automation wherein I have captured one area and saved that image in one data item then I have used Image Contains Colour action in Image Manipulation VBO and input the Image data item and Hex code of captured area to this action but unfortunately it is not identifying the colour of Data item image with the hexacode which I passed even I have passed the same Hexcode captured image colour

John__Carter
Staff
Staff
If the image captured from the application is OK then it has to be the Hex code that is wrong. Have you include the Alpha channel, ie AARRGGBB, eg FF336699?

Thanks John for your help,actually in Hex code I haven't prefix with FF so after adding FF prefix with hex code it is working fine now.But I have one doubt here why we put FF prefix before Hex code?Is there any significant of it?

Denis__Dennehy
Level 15
The Identify Font Color chapter in the introduction to surface automation guide is all about what makes up the hex code. Personally, I don't use the contains colour action any more. I just create an image with one or two pixels with the color I want and use the normal image search - find image action, with a tolerence set just in case there is an issue in the production desktop ui where exact colour matches cannot be trusted.

EstebanCarrasco
Level 4
I am having a problem with the ""Image contains color"" function where I passed this hex code ""# FFFF00"" (It is correct) but the action returns a false. Does this really work? what am I doing wrong? I have to detect the response of a web system where it is indicated by semaphores. Red or green yellow Attached test image with hexadecimal color.   Please your comments...