I’m trying to put a rectangle with a different color than the text behind it, and if I try and change the color of the rectangle it changes the color of everything in my project
Take a look at the documentation for
popStyle(). These help ensure that style changes are “local” in effect.
The last selected color set by fill() is used for all subsequent drawings based on fill().
You must set the color to what you want after you draw your rect.