import re
from System.Collections.Generic import *

def hueTunes(song,artist,album):

    palette=["red","green","purple","yellow","blue","white","pink","orange"]
    payload=[song,artist,album]
    
    for item in payload:
        for colour in palette:
        #checks if media data has one of the colours in it. The 1st colour found generates event "Hue.song", w/ payloads {1}:colour, {2}:title
            if re.search(colour,item,re.I):
                vc.triggerEvent("Hue.song", List[str]([colour, item]))
                return
