Using Python3, If I have a class named COLOR
class COLOR:
    RED =   '\x1b[41m'
    GREEN = '\x1b[42m'
    BLUE =  '\x1b[44m'
I can create a dictionary as such
myColor = {
    "RED":   COLOR.RED,
    "GREEN": COLOR.GREEN,
    "BLUE":  COLOR.BLUE,
}
Is there a pythonic way to programmatically loop through all elements in the class and automatically create the dictionary?
 
    