OK, so you have a note for ‘Ginger’ that—amongst other things—lists its name in various languages. Then—here the description is far less clear, you have a note per source/reference (?) about that parent note. A little sample doc or a screen grab might help here. So something like this:
I’m unclear of the exact meaning of ‘codes’ here. My best guess is that by selecting (how?) a given source person, the colour of per herb/space spice notes in the Outline view will change based on what change in the document?
In case it helps, the colour as set in $Color is used in different parts of different views—the same colour but a different visual use of that colour:
- Map, Hyperbolic views: the fill colour of the note icon
- Outline, Chart, Timeline, Attribute Browser views: the colour of the note title
- Treemap view; the border colour of the item
- Crosstabs view: not used except possibly as a colour stripe in the per-cell data.
If you want to apply a particular source’s (book/author/tradition/etc.) taste profile across numerous herbs/spaces, them it might be better to have a single note per source and have a Dictionary attribute hold per-source tastes for each herb/spice. If you use a fixed taste vocabulary, a separate dictionary can hold taste-to-Tinderbox-colour mappings, e.g. acid:red;sweet:yellow;...
etc.
That way you could tell Tinderbox to colour the $Color of all herb/spice notes according to a particular source’s tastes. The rough code logic being
- get a list of all herb and/or spice notes (e.g. “Ginger”) you wish to colour.
- store the source whose taste profile we want to colour-display.
- test each item from step #1 in turn (a
.each()
iteration of the list)
- look up the item in the nominated sources taste dictionary
- if found, take the taste value, loo-up the associated colour and use that value to set the item’s $Color
- if no match set a dull, null, value so un-tasted items don’t create visual noise (e.g. a light grey colour)
To reset, step through the list again and reset $Color ($Color=;
) so the note resume the doc default or prototype inherited colour.
I hope that helps you with some ideas to help get going. 