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/fb19cd02-5a3c-4ecc-967b-c69e76a83c6a%40googlegroups.com.