That script is not correct. If you post the full script it would be easier to give feedback. Please use code tags when posting, whitespace is very important in Python and the forum's code tags will preserve it.
This line is nonsensical:
Code:
if 'orange': (0, 140, 255)==1
The if test will always be True because 'orange' is a non-empty string. You need to have a variable to compare against the string. Something like:
I'm not sure what this is supposed to do, but I am sure it's not what you want:
Presumably you want to use your PLC library to set a bit here. What you're actually doing is creating a Python tuple and comparing it 1, then discarding the result.