snehilvj / dash-iconify

Iconify for Plotly Dash
https://www.dash-mantine-components.com/dash-iconify
MIT License
52 stars 2 forks source link

Does the color attribute work? #8

Open ytalp17 opened 1 month ago

ytalp17 commented 1 month ago

May I learn whether the color attribute work as expected? If yes, could you please provide me a way to use it.

AnnMarieW commented 1 month ago

Yes, it works, there are multiple examples in the docs. Can you give a complete minimal example of it not working?

ytalp17 commented 1 month ago

from dash import Dash, html from dash_iconify import DashIconify

def get_icon(icon, height, color=None): return DashIconify(icon=icon, height=height, color=color)

app = Dash(name)

app.layout = html.Div([ html.Div([ "Icon:", get_icon("emojione-monotone:letter-s", 18, color="red") # working example ], style={'display': 'flex', 'alignItems': 'center'}) ])

if name == 'main': app.run_server(debug=True)

I just happen to see that color attribute does not work for certain icons (e.g. twemoji:letter-s). Is there any way to change color of the icon on my example for instance? If no, is there any way to tell which icons have changable color?

AnnMarieW commented 1 month ago

You can find more information in the Iconify docs https://iconify.design/docs/icons/icon-basics.html#colors