def __init__(self, name=None, r=0, g=0, b=0, a=255):
        if name:
            if COLOR_CODES_INV not in name:
                self.logger.warn("Invalid color name: " + name)
            hexstr = COLOR_CODES_INV.get(name, '000000')
            self.r = int(hexstr[0:2], 16)
            self.g = int(hexstr[2:4], 16)
            self.b = int(hexstr[4:6], 16)
            self.a = 255
            self.name = name
        else:
            self.r = r
            self.g = g
            self.b = b
            self.a = a
            if self.hex not in COLOR_CODES:
                self.logger.warn("Invalid color hex value: " + self.hex)
            self.name = COLOR_CODES.get(self.hex, self.hex)
dataset/ETHPy150Open GraylinKim/sc2reader/sc2reader/utils.py/Color.__init__/swapped operands of `not in`