T E

The $param$ format is only valid in macros
\define macroname(param)
$param$ valid here however since you set the variable you can use $(col)$ 
here in the macro
\end

You may also find using the macro call widget is an easier way to pass 
parameters to a macro

I know this is not a full answer, I would only give that if I tested it 
first, but I hope it helps

Regards
Tony


On Saturday, February 22, 2020 at 10:22:41 AM UTC+11, T. E. Sanders wrote:
>
> This is probably another example of me not understanding the syntax. 
> This...
>
> <$set name="col" filter="[all[current]get[color]]">
>
> <$vars foregroundColor=<<contrastcolour target:"""$col$""" 
> fallbackTarget:"""$fallbackTarget$""" ...
> ...
>
> Though I can transclude "col" and see it's the correct color, I can't 
> figure out how to get it into this <<contrastcolor target: ____. macro. If 
> I put <<contrastcolor target:"#444444" then I see it works fine, so I'm not 
> getting the var into properly. My col variable fixed my background issue. I 
> can use it there with no problem, just not this <<contrastcolor macro
>
>
> On Friday, February 21, 2020 at 4:18:07 PM UTC-6, T. E. Sanders wrote:
>>
>> Sorry guys, I know I have a lot of questions. I've gotten pretty far on 
>> what I'm trying to do. I have a macro where the main one that is called 
>> calls another in the way the tag pill macro works.
>>
>> So I have colour={{{ [<__tag__>get[color]] }}} being passed to a 2nd 
>> where I do some manipulation and whatnot. 
>> This doesn't give me a variable like "#ff4455" but a list of parameters 
>> with colors. One of them is "primary" and I can see this is the color from 
>> the tiddler.
>>
>> alert-background: #ffe476
>> alert-border: #b99e2f
>> alert-highlight: #881122
>> alert-muted-foreground: #b99e2f
>> background: #ffffff
>> blockquote-bar: <<colour muted-foreground>>
>> button-background:...
>> ...
>> primary: #ff4455
>> ...
>>
>>
>> SO this code:
>> <$vars foregroundColor=<<contrastcolour target:"""$colour$"""  
>> fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" 
>> colourB:"""$colourB$""">>
>> backgroundColor="""$colour$"""  >
>>
>> won't work with this. I hardcoded a test color and it does work that way, 
>> which leads me to believe colour={{{ [<__tag__>get[color]] }}}. is indeed 
>> giving me something
>> other than a usable hex color.
>>
>> How can I get a usable $colour$ variable into this macro from the color 
>> field in the tiddler?
>>
>> Thanks again!
>>
>

-- 
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/f0bed369-2a9a-4b00-81d4-cbb45043dc4e%40googlegroups.com.

Reply via email to