Sample "meaty" part:

\define beDotted( likeThis )

<$list filter="[[$likeThis$]split[]] +[search-replace:i[y],[yellow]] 
+[search-replace:i[r],[red]]">
  <$vars thisStyle={{{ [[min-height:25px;width:25px;background-color:]] 
[<currentTiddler>] [[;border-radius:50%;display:inlin-block;border:3px 
solid black;]] +[join[]] }}}>
    <span style={{{ [<thisStyle>] }}}>&nbsp;&nbsp;&nbsp;&nbsp;</span>
  </$vars>
</$list>

\end

<<beDotted "YYYYRRR">>

Any questions, please ask !

There are likely less verbose ways of going about this, by I rely on the 
verbosity to clearly let me know what is going on...


On Tuesday, November 30, 2021 at 2:50:37 PM UTC-4 Charlie Veniot wrote:

> Okay.  Just need to know what the meaty part should be.  (i.e., what 
> should be where the "<<currentTiddler>>" is?)
>
> \define beDotted( likeThis )
> <$list filter="[[$likeThis$]split[]]">
> <<currentTiddler>>
> </$list>
> \end
>
> <<beDotted "YYYYRRR">>
>
> On Tuesday, November 30, 2021 at 2:42:30 PM UTC-4 Charlie Veniot wrote:
>
>> For sure a macro could do that.  Give me a few minutes.
>>
>> On Tuesday, November 30, 2021 at 2:33:00 PM UTC-4 [email protected] 
>> wrote:
>>
>>> Oh, sorry - I forgot some details:
>>>
>>> I just want to be able to ID colors as a visual example easily - they 
>>> don't have to be dots. 
>>> If I had my druthers, I'd love to have some sort of macro where I pass 
>>> in something like "YYYYYRWG" and get the above or similar. Could a macro do 
>>> that?
>>>
>>> On Tuesday, November 30, 2021 at 11:29:48 AM UTC-7 [email protected] 
>>> wrote:
>>>
>>>> I created some classes to created colored dots, so that I can list 
>>>> specific colors for a project. I call them colorways. An example :
>>>>
>>>> [image: Annotation 2021-11-30 112413.png]
>>>>
>>>> The issue is that coding them is a pita. For example, the code for the 
>>>> above is:
>>>>
>>>> <span class= "cwd ylw"></span><span class= "cwd ylw"></span><span 
>>>> class= "cwd ylw"></span><span class= "cwd ylw"></span><span class= "cwd 
>>>> ylw"></span><span class= "cwd red"></span><span class= "cwd 
>>>> wht"></span><span class= "cwd grn"></span>
>>>>
>>>> where 
>>>>
>>>>    - cwd is a class that creates colorway dots
>>>>    - ylw (and red, wht, grn) is a class that makes the dot yellow
>>>>
>>>> Can anyone think of an easier way to do this?
>>>>
>>>>
>>>>

-- 
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/e63d6d0c-dbac-4a40-a528-389830773200n%40googlegroups.com.

Reply via email to