For the column contents, the following general program mode template should work:
Code:
program:
list_union(
'',
strcat(
contains(field('#cola'), 'yes', 'ColA,', ''),
contains(field('#colb'), 'yes', 'ColB,', ''),
contains(field('#colc'), 'yes', 'ColC,', ''),
), ',')
For coloring, you would define a custom coloring rule that looks something like the following. It works because the above template produces the list in a known order.
Code:
program:
v = field('#composite');
first_non_empty(
strcmp(v, '', '', 'azure', ''),
strcmp(v, 'cola', '', 'orange', ''),
strcmp(v, 'colb', '', 'red', ''),
strcmp(v, 'colc', '', 'blue', ''),
strcmp(v, 'cola, colb', '', 'yellow', ''),
strcmp(v, 'cola, colc', '', 'pink', ''),
strcmp(v, 'colb, colc', '', 'mauve', ''),
strcmp(v, 'cola, colb, colc', '', '#445533', ''),
)
The last color is an RGB specification. Note that it is very possible that the performance will not be acceptable because of all the tests.