nut.js icon indicating copy to clipboard operation
nut.js copied to clipboard

Searching for a text color?.

Open jhemmmm opened this issue 1 year ago • 2 comments

Hello,

There's this game that I'm trying to create a macro/automation using nut.js, I'm trying to search for the color of the text which has color transparency. So getting the exact pixel color and checking it is kinda impossible. For example, the color of the text is "RED", sometimes it becomes, "DARK RED, LIGHT RED" because of the background of the text, Is there any possible way to check that?.

jhemmmm avatar Aug 08 '22 20:08 jhemmmm

If I understand this correct you're trying to locate the position of the text, but since it's not fully opaque it's hard to reliably detect via image template, right?

s1hofmann avatar Aug 09 '22 10:08 s1hofmann

If I understand this correct you're trying to locate the position of the text, but since it's not fully opaque it's hard to reliably detect via image template, right?

Exactly. Do you have any suggestions?.

jhemmmm avatar Aug 09 '22 20:08 jhemmmm

I fixed it by using tolerance and other way to get it done.

jhemmmm avatar Aug 14 '22 03:08 jhemmmm