Are there any recommendations on ways to extend th...
# compose
d
Are there any recommendations on ways to extend the
ColorPalette
in
ui-material
? For example my app draws a lot of diagrams and they all are styled in additional colors not covered by material spec, both dark/light variants. Currently one can't just add a color to a
ColorPalette
, and then there's an internal
ObservableColorPalette
trick which makes me think that dummily providing additional colors through an ambient might be a performance issue.
a
It depends on how many colors you provide in the same object carried by a single ambient. Most of the material composables only read a few colors and which ones they read varies greatly. The observable palette arrangement is meant to keep composables from invalidating when unrelated colors change
d
I see, thanks! For now I'm just playing by trying to build a project with complex UI from ground up. Starting from the UI-Kit. So I will judge based on your recommendation. If colors changes are consumed in groups, then it's OK, otherwise I might introduce something similar to observable palette.