Assigning colours by column substring
I’m trying to assign columns to colours based on a dictionary of column name substrings, for example: Columns whose name contains “XR” should be black, columns whose name contains “Ludwig” should be red, etc.
The task has proven impossible. Can anyone demonstrate how it can be done?
Many thanks!