Color by value

hi guys, I have a question, I would like to create a function whith python that has as input a list of colors and a value and outputs a color of my list compared to input value I gave as input.
I do not using matplotlib
Thanks guys.

Here’s one approach:

1 Like

Thanks, this script Is very good for me.

I have various “similar” things but are in C#. Anyway get the attached: it would be easy to get some ideas (Note: there’s no auto translation available form C to P).

Color_EntryLevel_V4.gh (115.4 KB)