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 = int(temp / 256)
        green = temp % 256

        temp = int(temp / 256)
        red = temp % 256

        return (red, green, blue)

    if not len(color) == 3:
        raise Exception('Invalid color {0}'.format(color))

    return color
dataset/ETHPy150Open tkrajina/cartesius/cartesius/colors.py/get_color/original