Welcome Elih.
Here is one possible way to determine the color you touch on the app screen.
Adapt it for your app?