I don’t remember where I found this code to put a summary at the top of a tiddler that transcludes the contents of the “summary” field, but I wanted to change the color of the background so that it follows the selected palette.
The <<colour>> macro looks up the value of the named palette entry. However, to use this value, it needs to be wikified to resolve any indirect references to other palette entries.
The filter syntax can be simplified by replacing all[tiddlers+shadows]is[current] with just <currentTiddler>
Since your output is contained within an HTML <div> element, you can specify the desired background-color style there, without needing a separate @@ syntax surrounding it.
The TWCore supports a special extended HTML style.attribute="value" syntax that let’s you specifiy the value to apply to a particular CSS attribute.