You may try this macro

   - Code


\define colors(color:"black", txtcolor:"black", bgcolor:"white")
<span style="color:$color$;">&#9632;</span>
<span style="color:$txtcolor$;background-color:$bgcolor$;"> $color$</span>
\end


Put it in a tiddler tagged with $:/tags/Macro and name it what you like!


   -  Example
   

* <<colors "blue">>
* <<colors "peru" "peru">>
* <<colors "teal" "teal">>
* <<colors "#bada55" "black">>
* <<colors "#bada55" "black" "#bada55">>
* <<colors "#000000" "white" "black">>
* <<colors "deeppink" "deeppink">>
* <<colors "#663399" "white" "#663399">>




   - Output
   
<https://lh3.googleusercontent.com/-PhU1KC5kCQw/WzZaaDRVBnI/AAAAAAAAD50/KG1xrE1qN0816wRm5M0nIvTKH-7uGFy2QCLcBGAs/s1600/colors-macro.jpg>


/Mohammad


On Friday, June 29, 2018 at 6:44:04 PM UTC+4:30, talha131 wrote:
>
> Hi all,
>
> I want HTML color codes in my tiddly wiki to be highlighted? Something 
> like in the following screenshot. 
>
> <https://i.imgur.com/fBeZCXJ.png>
>
>
> How can I get this working, if it is possible at all?
>
> Thank you.
>

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/83c50640-624d-4be3-aad6-be067b0acab5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to