Hi @Madrigallo, if mode='lines you can only apply one color for the complete trace β you cant have a line with different colors based on anything.
mode='lines
See also