Background of Triangular objects

To mouse over a triangle, you want Point-Triangle collision detection. Here is one example in Processing – there are several great Processing collision detection guides, but rectangles get the most attention and not all of them cover triangles.

http://www.jeffreythompson.org/collision-detection/tri-point.php