def HEXtoRGB(Hex):
    """ convert HEX to RGB color
    :param Hex: HEX color integer or string
    :return: RGB tuple """
    if isinstance(Hex, str):
        Hex = int(Hex[1:], 16)

    R = (Hex >> 16) & 255
    G = (Hex >> 8) & 255
    B = Hex & 255

    return R, G, B