Closed
Description
Bug originally reported on the forum.
When using css colors with the first letter capitalized, a line chart will show all lines as black, although the legend will adhere to the correct css colors.
Plotly.py code:
import plotly.express as px
css_colors = ['AntiqueWhite', 'Aqua', 'Aquamarine', 'Black', 'Red']
# css_colors = [color.lower() for color in css_colors]
df = px.data.gapminder()
print(df['continent'].unique())
color_discrete_map = {subject: css_colors[i] for i, subject in enumerate(sorted(df['continent'].unique()))}
fig = px.line(df, x="year", y="lifeExp", color='continent', color_discrete_map=color_discrete_map)
fig.show()