Setting hex color for Dash Mantine component

Dash Mantine Components seems to only allow setting the color property to a word color from the theme.colors list. What if I want to set the color using a hex value; e.g., “#F9234A”? Setting the color property to a value like this doesn’t work. Is there a work around so I can specify my desired color via hex value?

This works

dmc.Avatar("MK", color="cyan", radius="xl")

But this doesn’t

dmc.Avatar("MK", color="#F9234A", radius="xl")

I read that the color parameter allows a dict to supply its value and thought this might allow me to assign color via hex value but I can’t find any information on what keys such dict ought to have.

Hi @russhopper I couldn’t figure out how to assign a color to the Avatar I think the colors are somehow linked to the default colors which is a dictionary of lists.


Maybe @snehilvj can help out :upside_down_face:

1 Like

Hey, added a section for custom colors in dmc. Check it out here: