def gen_image(self, size, color_value):
        img0 = cv.CreateImage(size, self.image_depth, self.image_channels)
        if color_value == 'transparent':
            color = (255, 255, 255, 255)
        else:
            color = self.parse_hex_color(color_value)
            if not color:
                raise ValueError(color_value % 'Color %s is not valid.')
        cv.Set(img0, color)
        return img0
dataset/ETHPy150Open thumbor/opencv-engine/opencv_engine/engine.py/Engine.gen_image/swapped operands of `%`