Reusable element dynamic color not showing


I am using a dynamic data link to a color palette datatype.

I use them regularly and they work on page, however I am not getting a reusable element capable of displaying the color as it should.

Is it not possible to use dynamic data in a reusable element despite being capable of adding the expression?

Hi @boston85719 :slight_smile: I just tested in a demo app and the dynamic colors in a reusable element were working as expected, but maybe it’s a bug with a certain element? I can definitely take a look if you’d like to share a link to your app editor!

Hi @fayewatson how did you set up the demo app? I have had issues with dynamic colors in various ways…all of which I believe are connected with the way bubble recalls styles based on the type of elements I have issues with, so it doesn’t seem to be certain element bug.

When I set up to use dynamic colors, I created a datatype of color palette and had data fields (texts) that were for the different colors ( Primary Dark; Primary Light etc. )

When using a dynamic color, I would do a search for the color palette and point toward the color data field I want. This works fine on the page.

However, as mentioned, not only is it that reusable elements don’t show the color, instead showing the absence of color, but it is also when I save a style that originally had a dynamic color.

The strange part about the style being saved using a dynamic color is that it also doesn’t show any color when displaying on page, but if I “remove style” in the elements editor, the original style is seen with a reference to the dynamic color. So the style is “saving” the dynamic color correctly, it just can’t display it the same way a reusable element can’t display it.

I don’t know, but I am assuming it is something with my set up. If you could link the demo app, I could double check how you have it set up.

@boston85719 Ah! My apologies, I didn’t realize that you were referring to using dynamic colors in saved styles. I don’t think that is currently possible unfortunately. :slightly_frowning_face: My demo setup only had a reusable group element, with a shape element within it. The shape element used the dynamic color feature, without a saved, defined style.

When you say “a reusable element can’t display it” are you referring to reusable elements also can’t display dynamic colors when they have a defined style? With defined styles on regular elements or reusable elements, I don’t think it’s possible to use dynamic colors, but it should be possible on any element without a defined style (not 100% sure though!)

No worries…I believe the issue is that it doesn’t recognize the path to the database. It works fine when I manually enter the hex code, but not if it is a dynamic expression linking to a database entry.

@boston85719 if the element or resuable element doesn’t have a defined style then the dynamic colors should work at all times. If it’s not working without a defined style that might be a bug. Feel free to share a link to your editor and I can definitely take a look! :slight_smile:

I made a new demo app for this…seems like the reusable element is working in this one…so I guess I will need to go back to my original app, delete the reusable element that doesn’t work properly, and then make it again the same way and hope it works ( have to do this quite frequently as of late ).

However, the text style save doesn’t work…I have on the page two texts, one I created and did not save as a style…the second I copied the first text and then saved it as a style but the color is not showing.

Right, I think this is expected behavior since dynamic colors can’t currently be used in saved styles. I totally agree that it would be useful though – hopefully it is enabled in the future! :slight_smile: