What have you tried? You MUST try to write the code yourself.
You will need a setup() and draw() function. In setup(), you must call size(). Start with that!
Now can you draw a triangle? Or how about a line? Use line()!
Can you change the color of the line? Can you draw three lines of different colors? Use stroke()!
Have you read the guide on rotate()?
It’s really hard to help with general “how do I do this” type questions. Please try to break your problem down into smaller steps and take those steps on one at a time.
You might also want to read through this guide:
I’m closing this thread, as it’s pretty much a duplicate of this one: