Just for reference, I implemented this in the past in a slightly different way for colouring and displaying tidders as tags based on their status field. I essentially cloned the $:/core/ui/TagTemplate to make the following $:/custom/ui/TagTemplate
\whitespace trim
<span class="tc-tag-list-item">
<$set name="transclusion" value=<<currentTiddler>>>
<$macrocall $name="tag-pill-body" tag=<<currentTiddler>> icon={{!!icon}} colour=<<tag_colour>> palette={{$:/palette}} element-tag="""$button""" element-attributes="""popup=<<qualify "$:/state/popup/tag">> dragFilter='[all[current]tagging[]]' tag='span'"""/>
<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes" class="tc-drop-down">
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TagDropdown]!has[draft.of]]" variable="listItem">
<$transclude tiddler=<<listItem>>/>
</$list>
<hr>
<$macrocall $name="list-tagged-draggable" tag=<<currentTiddler>>/>
</$reveal>
</$set>
</span>
Only changing the highlighted part from a field transclusion {{!!colour}} in the original core tiddler to a variable <<tag_colour>> in the custom one. Everything else is the same.
Then I made a macro to call that template instead of the normal one:
\define status_colour() {{$(status)$!!tag_colour}}
\define colour_status_tag()
<$list filter="[is[current]has[status]get[status]]" variable="status">
<$wikify name=tag_colour text=<<status_colour>>>
<$transclude tiddler="$:/custom/ui/TagTemplate"/>
</$wikify>
</$list>
\end
<$list filter="[tag[tag_on_tiddlers_with_status_field]]">
<<colour_status_tag>>
</$list>
Maybe more complicated that what you need but extensible to make new tiddlers with different status (or whatever other property that you want to colour them by). You can likely reuse the same technique to change the icon too.
/Mike