[tw5] Grabbing a colour palette colour value for custom elements

(If viewing this from Google Groups, ignore the triple backticks.)

This is one approach to applying a particular colour setting from colour palettes to a custom element, to make sure that element fits any selected palette:

<$let couleur={{{ [[$:/palette]get[text]getindex[sidebar-tiddler-link-foreground]] }}}>
<style>
.couleur {color:<<couleur>>;text-decoration:underline;text-decoration-color:<<couleur>>}
</style>
<$button message="tm-modal" param={{!!title}} class="tc-btn-invisible couleur" >{{!!title}}</$button>
</$let>

1 Like