Hi Mohammad, not quite what I am after. I'll try to express myself better below.
The code I have in my original post works (just as well as the changes you proposed), but it uses a fixed value represented by the "#c8ced8" string => I'd like to change this hard coded value to <<colour foreground>>.
Trying to substitute it using:
<$vars icon_color="<<colour foreground>>">
<$macrocall $name="drawIcon" foreground="<<icon_color>>" />
nor
<$vars icon_color="<<colour foreground>>">
<$macrocall $name="drawIcon" foreground=<<icon_color>> />
nor
<$vars icon_color=<<colour foreground>>>
<$macrocall $name="drawIcon" foreground="<<icon_color>>" />
nor the simpler:
<$macrocall $name="drawIcon" foreground="<<colour foreground>>" />
nor:
<$macrocall $name="drawIcon" foreground=<<colour foreground>> />
does not seem to work. The <<colour ...>> macro by itself works well (outside of the SVG), but I am missing something to tie it all together. I tried a few things with single quotes and triple quotes to no avail. I tried the SVG tag directly in the tiddler text (not in a \define pragma), and tried to use \define mycolor() <<colour foreground>> instead and tried changing the tidder type; still, I am short of finding something that works well.