You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the n_colors function to generate a list of colors in RGB space and I got the following error message trying to use the generated colors in a plot: Received value: 'rgb(-2.842170943040401e-14, 255.00000000000003, 0.0)'
Looking at the code for n_colors, I noticed that the computed float values are used directly, however there should be a clipping applied to make sure the values are between 0 and 255.
You should be able to reproduce this issue like this:
from plotly.colors import n_colors
n_colors(lowcolor="rgb(255,0,0)", highcolor="rgb(0,255,0)", n_colors=14, colortype="rgb")
The text was updated successfully, but these errors were encountered:
Hello!
I'm using the
n_colors
function to generate a list of colors in RGB space and I got the following error message trying to use the generated colors in a plot:Received value: 'rgb(-2.842170943040401e-14, 255.00000000000003, 0.0)'
Looking at the code for
n_colors
, I noticed that the computed float values are used directly, however there should be a clipping applied to make sure the values are between 0 and 255.You should be able to reproduce this issue like this:
The text was updated successfully, but these errors were encountered: