How to use CSS stored in database

Hi all,

I'm working on a app where I use custom CSS to override exsisting styling of Retool. For example: I'm changing the color of 'buttongroup' component.

Now I want to use colors comming from a database. So if the database tells me the button should be green I want to change the button to green.

Is there a way to manage this?

Thanks for your help!

You can tell your button what color to be by referencing your query and your color field, some along these lines:

image

Exact syntax will depend on how you get your backend data.