def int_to_rgb(num):
    """ Convert color from 24-bit integer to RGB """
    color = bin(num)[2:].zfill(24)
    b = int(color[:8], 2)
    g = int(color[8:16], 2)
    r = int(color[16:], 2)
    return r, g, b