Parallel coordinates - lines coloring

Hi,
I have a parallel coords plot, with let’s say 5 lines. I would like to give RED color to the 2nd line of my data and BLUE to all the other lines.
I am trying something like:

var trace = {
                type: 'parcoords',
                line: {
                    color:[0, 1,2, 3, 4],
                    colorscale: [[0, '#223fb3'], [0.2, '#d90707'], [0.4, '#223fb3'], [0.6, '#223fb3'], [0.8, '#223fb3'], [1, '#223fb3']],
                }
                dimenstions:[
                {
                    range: [0, 100],
                    label: 'height',
                    values: [33, 56, 2, 98, 5],

                    tickvals: [33, 56, 2, 98, 5],
                    ticktext: ['line1', 'line2', 'line3', 'line4', 'line5'],
                },
                {
                    range: [500, 3000],
                    label: 'width',
                    values: [894, 2391, 998, 790, 2500],

                },

               ]
}

var data = [trace]
            
Plotly.newPlot('parallel-plot', data, layout, {displayModeBar: false});

But actually it is not coloring the 2nd line in RED and all the others in BLUE…

What am I doing wrong?

I think your color and colorscale numbers should match. And the number should be between 0 and 1.

Like:

   line: {
        color: [0, 0.25, 0.5, 0.75, 1],
        colorscale: [[0, '#223fb3'], [0.25, '#d90707'], [0.5, '#223fb3'], [0.75, '#223fb3'], [1, '#223fb3']],
    },