How to change color by value condition?

I want to read element parameter value(int) as a condition to change color,
like this
if num(parameter) =1 color is #6D1CD753(colour code )
=2 #6D2556E5 etc.
My first thought method is usinge python,but i dont know how to out put color.
Can someone give me advice?


How about having the list of your colors directly in a Dynamo list (without using any Python node/code), and then fetching the color you need with List.GetItemAtIndex ?

Hope it helps