Feature request: "Color picker" column

Hi there retool team,

As there is a lot of opportunity to customize based on colors, it would be great to give users the option to select their own colors.

Not sure how complicated this would be, but I thought of a new column type for tables which is a color picker (identical to the one in all of the components' "Styles" section.

This would allow for an easy capture of preferred columns in database and loop it back to custom preferences in components.

Thanks!

Hello @MiguelOrtiz!

There might already be an option for selecting colors for columns in a table. Let me know if the following is the right functionality you are looking for.

This method would be to change the color of a column, but it sounds like you want user specific functionality. Could you elaborate more on what you have in mind?

Also I am a little confused on the last paragraph, the color for the column as detailed in my example would only show up in the UI and not have any data footprint in the database. Are you looking to add a new row to the DB which contains the color data that each row has?

Hope this helps!

Hi Jack,

Thanks for getting back to me. So, to be very specific, a couple of my clients use tags for their task management apps. There are two columns, one for assignee and another one for the team. I want to give users (at least however works as their admin) to pick which color each individual and each team should appear in the tags.

So, right now I have selected this manually and the color hex is saved in the database where users and teams are stored. As, it is quite easy to select item.color in the mapped values.

I found a potential solution here but it would be great to have this embedded into the table.

Hi @MiguelOrtiz - you could use dynamic styling to determine the tag colour depending on certain conditions (ie. current_user.email or if current_user belongs to a certain group). You could make use of user attributes for this also.

Attached is an example where the Viewer tag color is dynamically set according to a switch toggle. The query that determines the tag colour according to the switch toggle is set on page load.

Here a short loom that walks you through the app.

dynamic tag color css.json (70.0 KB)

1 Like

Hi Alice,

Thank you for showing this. Ultimately, I want users to be able to pick the color they want for their own tag. So if the user wants to be blue, he will select the color and it will update the HEX in the database.

Thank you for the very specific example @MiguelOrtiz!

It sounds like there is one row for each assignee.

To give an admin the ability to select color for assignee and for team, you could make a form component which modifies an object.

Where the keys are the assignees and the value would be the color, then set the table to display this for the cell/row/column however you like. Or have a color picker modal like the one in the link you shared.

I agree it would be great to have this functionality embedded into the table by default, but there should be some decent work arounds for now as it might take a long time for the eng team to get to adding such functionality :smiling_face_with_tear:

1 Like