Figured it out with this:

<$vars foregroundColor=<<contrastcolour target:"""$colour$""" 
fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" 
colourB:"""$colourB$""">> backgroundColor="""$colour$""">

On Thursday, February 20, 2020 at 4:27:45 PM UTC-6, Mark S. wrote:
>
> Not sure what the "set" was supposed to be doing. If I understand what you 
> want, this seems to work:
>
> \whitespace trim
>     <span style={{{ [{!!color}addprefix[background-color: ]] }}} >
>     <<currentTiddler>>
>     </span>
>
>
>
> On Thursday, February 20, 2020 at 2:06:44 PM UTC-8, T. E. Sanders wrote:
>>
>> Hey all, I'm trying to write a template. It works as a template in that 
>> it renders the currentTiddler, but if I try to use the color from the 
>> tiddler on the background, it doesn't evaluate and simply renders the text 
>> as-is.
>>
>> For example
>> \whitespace trim
>> \define col() {{!!color}}
>> <$set name="transclusion" value=<<currentTiddler>>>
>>     <span style="background-color:<<col>>" >
>>     <<currentTiddler>>
>>     </span>
>> </$set>
>>
>> doesn't work. Neither did style="background-color:{{!!color}}" and it 
>> doesn't matter if I use quotes or not. Clearly I'm missing some syntax or 
>> something.
>> The goal is just to make the background the color set in the color field. 
>> Ideas?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/849207ae-8741-41af-b64a-c40449595584%40googlegroups.com.

Reply via email to