Parallel plot colors

I’m still having an issue understanding how the color scale works for the parallel coordinates plot. In my case, the color values are either 0 or 1 which i want to display as red or green. This works fine in some situations, but if I have all 0’s or all 1’s then the color seems to be displayed as a brown

Here’s a fiddle that shows this behavior:

Are there any other ways to color the lines on my plot (to have just discrete colors). Or if I have to use color scale, how can i get around this issue?

You need to specify the color domain with cmin and cmax as in

By default, even though all your color values are 0, we add a bit of padding when computing cmin/cmax. In your case, cmin: -0.5 and cmax: 0.5, see