def get_color(color):
    """ Can convert from integer to (r, g, b) """
    if not color:
        return None
    if isinstance(color, int):
        temp = color
        blue = temp % 256
        temp = temp / 256
        green = temp % 256
        temp = temp / 256
        red = temp % 256
        return red, green, blue
    if not len(color) == 3:
        raise Exception('Invalid color {0}'.format(color))
    return color
