Color customization

Hey there!

I have a question… My app will be hosting several shops. Each shop will be able to customize its home page (images, text, and so on). The same home page is used for all shops, customization comes from the database.

Ok, no problem till there. What I would like to implement, is a way for each shop owner, via the backend part of the app, to customize colors : background, fonts, buttons… But this customization will have to be specific to each shop.

For this purpose, I will use a color picker component, but… : is it possible to customize these colors for each shop? And Hat’s the best way to proceed? Using states ? But in this case, can I get the shop’ selected color from a database field?

Many thanks in advance for your help
(I’m still newbie… Sorry! :smile:)

Christophe HK

Yes you can store colors (i.e.: #333333) as text values and use them as the dynamic color.


Caveat, it’s not very efficient. The page will load, paint and THEN you’ll get the custom colors. You may be able to solve that with “dynamiccolor_fromdb : defaulting to #333” or something like that so the initial load is pretty and not colorless. Let us know what you come up with.

1 Like

Many thanks @duke.severn, I’m going to give a try!!