Jump to content
We've recently updated our Privacy Statement, available here. ×

Render a hex colour in a column

Paul Hickford 2
Go to solution Solved by Gaia Paolini,

Recommended Posts

Hi all,

I have a dataset and one of the columns that is feeding into it is a hex code for a colour, eg #9fdcc9.  I'm wondering if there is a way to make Spotfire intelligently understand these values as the colour they are meant as.  I know I could setup colouring for the columns with a set of rules (there are currently only a handful of colours) but before I embark on doing this manually was wondering if there is already an elegant solution.

Any ideas?

Link to comment
Share on other sites

  • Solution

I guess you could do it with an Iron Python script, but by far the easiest solution would be to create a custom colour scheme that you can then permanently assign to your column.
To do that you would first assign the corresponding colours to your variable, within a visualization (say a barchart).

To save it as a colour scheme: go to the icon shown in the screenshot, click on Save As > Document Color Scheme.


give it a name (e.g. hexColScheme)
then go to the column properties and assign it as a categorical colour scheme (type the exact name)


so the scheme is kept with the variable and every time you use that variable to colour, it will be used.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...