Hey @mean02776
I think you will have to use some CSS to accomplish this, seeing as Bubble doesnât allow us to set colours from dynamic variables. I am no CSS expert, but I did some experimenting and think I can solve your problem.
If you are just using this to display the colour of their username once-off, that should be fine, but if you are going to be using this colour for multiple text fields all over the place, I would consider creating a reusable component with the same implementation as I outline below.
So, first of all you will need to have a Colour text field on your user object in your database, and simply set that Colour text field to the hex value of the colour the user selects.
Then, when it comes to display the text field with that colour, this is where your CSS comes in.
First, make sure you have checked âExpose the option to add an ID attribute to HTML elementsâ in settings. You can find this in Settings â General â Scroll down to the bottom to Advanced Settings.
Next, add an ID Attribute to the text field in question. You can find this at the bottom of the appearance tab in the editor. It doesnât really matter what you make this ID, something simple like âusername-textâ is fine.

Now, add an HTML element to the page. You can add it in anywhere and make it invisible so that it doesnât affect your UI. Inside this HTML element, you need to paste the following:
<style>
div#username-text {
color: #0000FF!important;
}
</style>
You will not that the ID you put into your text field, âusername-textâ is used here as well. If you used a different ID, be sure to change it in the code above too. I have set the colour in this example to blue, which has a hex value of #0000FF, but you of course will want to do this dynamically. So, instead of hardcoding in the colour hex value like I did, use the âinsert dynamic dataâ option in the editor to add your current userâs hex value from the database.
Hope this helps, and let me know if you have any questions!