Ways to save colour settings from Color manager or import them for use with visual nodes


Is there a way to save the colour settings assigned/associated to categories in a column using Color Manager so that these can be saved and used again later without having to reassign them again when the upstream workflow gets changed.
OR is there a way to set these in a table (e.g. as hex codes etc.) that can be read into a KNIME workflow and fed to visualisation nodes like Conditional Box Plot?




The Color Manager node has 2 output port. The second port gives you the color settings so you can use it again. You can connect this port directly to the input port of a Color Appender node or you can save the settings using Model Writer node and read it somewhere else using Model Reader node.



Hi @armingrudd

Many thanks for this great solution!

I realize I now have a supplementary question related to this - is there a way to get the colour settings to inherit to daughter categories?
For example I have a category called Control which was coloured blue in the colour set column using the above solution. These Control category rows originate from different data files which I need to label “_1” or “_2” or “_3” using string manipulations, column aggregations etc. Currently when I create these daughter categories I lose the colour setting.
Is there a way to avoid this or part match the category names in the file read in by Model Reader to the daughter category names and transfer the colour setting?

If it’s appropriate I could turn this into a separate question and cross-reference this solution to it.

Thanks Again

John :grinning:

Keep the original category like “Control” and add the subcategories like “Control_1”.
Do not remove the main category if this is not necessary to exclude the column from the table.


Hi @armingrudd

Thanks for the response, I tried what I interpreted from your response (and several other things as well) but it did not work.
I have attached an example workflow with embedded toy data to illustrate what I have attempted.
inherited-colors_to_boxplot_test.knwf (23.2 KB)

Can you clarify how this would work?


You need to have unique subcategories connected to the second input port of the plot:

inherited-colors_to_boxplot_test.knwf (67.7 KB)



:bulb: :grin:
Fantastic - that’s the step that had evaded me (getting each colour setting associated Category to duplicate to confer that colour to each daughter sub-category) I had been trying to get the colour setting to inherit to the sub-category during their creation.

Many Thanks @armingrudd


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