Still new to using python and have a question. I'm working on changing colors on a screen using an array.
For example:
RED = (255,0,0)
BLACK= (0,0,0)
ColorArray = [RED,BLACK]
pygame.draw.rect(Page1,ColorArray[1],(80,60,100,10))
pygame.draw.rect(Page1,ColorArray[0],(80,60,100,10))
When I use my array, I get an error for an invalid color argument. Is there a workaround for this? When I just put RED
or BLACK
in the color location, everything works great.
Thanks,