def LightColor(par): try: hexColor = webcolors.name_to_hex(par['color']) except Exception: hexColor = "#FFFFFF" LightControl.setHexColor(hexColor, 0)