I'm making a background drawing system for a game using pygame, and as there are 1024 seperate squares per scene, I'm storing the color attached to each square in a .txt file, like

```
square1 = BLACK
square2 = GREEN

```

and so on.

When I read my file using this code

```
    read = open("testgraphics.txt", "r")
    xcoords = 0
    ycoords = 0
    for x in read:
        if xcoords > 1024:
            xcoords += 32
        else:
            ycoords += 32
        print(x)
        squarecolorformatting = x[-6:]
        squarecolor = squarecolorformatting[:-1]
        print(squarecolor) #This returns a string of just the color I want, e.g. BLACK
        pygame.draw.rect(screen,squarecolor, [xcoords,ycoords,32,32])
    #print(f.read())
    Scene1Read = True
    read.close()

```

I get the error `TypeError: invalid color argument` for the pygame.draw line. I understand
that I've read a string from my file, but how do I let python know I want my string "BLACK" to apply to the colors I set at start of my program, when I did `BLACK = (0, 0, 0)`?