def handle_packet(gp):
    global banner
    global RGB1
    global RGB2
    if (gp is None):
        return
    if (gp.packet_type == 'PALETTE'):
        entries = gp.payload['entries']
        if (len(entries) < 1):
            return
        elif (len(entries) == 1):
            entries.extend(entries)
        RGB1 = (entries[0]['red'], entries[0]['green'], entries[0]['blue'])
        RGB2 = (entries[1]['red'], entries[1]['green'], entries[1]['blue'])
    elif (gp.packet_type == 'ID'):
        banner = ('We love ' + gp.payload['name'])
def handle_packet(gp):
    global banner
    global RGB1
    global RGB2
    if (gp is None):
        return
    if (gp.packet_type == 'PALETTE'):
        entries = gp.payload['entries']
        if (len(entries) < 1):
            return
        elif (len(entries) == 1):
            entries.extend(entries)
        RGB1 = (entries[0]['red'], entries[0]['green'], entries[0]['blue'])
        RGB2 = (entries[1]['red'], entries[1]['green'], entries[1]['blue'])
    elif (gp.packet_type == 'ID'):
        banner = ('We love ' + gp.payload['name'])