What is the color?
-- an actor in the world called color
-- a pixel on the background image with this color
-- a pixel on the image of an actor at the position of the object
is it possible to make an if statement when a certain object is touching a certain color???
Why not this:
if (touchingColor(<< parameters >>))
where 'touchingColor' returns a boolean value indicating the touching state. The parameters would be any information the method might need in order to make the determination on that state. So, the answer to your question is --- Yes.
I really do not want to appear so blunt, vague or general about it; but usually, help can only be given in proportion to the amount of information provided.