You can create a triangle() and check if the mouse in within a specified distance and over a specified color using .get()
https://processing.org/reference/triangle_.html
https://processing.org/reference/dist_.html
https://processing.org/reference/get_.html