Conditional formatting based on content color code

I have an object that has a “color” field, which stores an hexadecimal value that a user selected.
I want to display the property in this color. For example if the hexa color is #e74c3c I would like this to be displayed in red.

The goal of the workflow is to let users have a color picker and display the color in a nice way (for example to use it further in maps to show pins with different colors, annotations on PDFs which should be displayed with different colors, custom React widgets … )

Questions:

  • [optional] Is there a way for a user to pick a color easily ? (Is there a color picker widget of some sort we can use in Workshop, for example ?)
  • Is there a way to display an hexadecimal code of a color in this color in Ontology Manager ? (to what I see in conditional formatting, we can’t take the the content of a column as the value to use)
1 Like

Unfortunately I don’t think this is something you can do outside of trying to define a huge number of conditional formatting rules.

In terms of hacky ways to achieve this, the one that springs to mind is just section header colouring. You can set a variable for ‘custom color’ and set that to the property of the object. If you set this to be a prominent callout header you should get a decent proxy for the behaviour you want. If you need this in a table-type view you could use a loop layout.

I can’t really think of any other widgets that allow colouring through a variable/property. I did think metric cards may enable this but you still have to define the dynamic colouring as conditional formatting.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.