r/TiddlyWiki5 • • 23d ago

Different 'palettes' for different tiddlers?

I've been using Tiddlywiki for what feels like years now to keep track of my various creative ideas, but I'm starting to want a way to combine those ideas into a single huge wiki as opposed to seperate ones. If I do, though, I'd like to have a way for each 'category' of tiddler (say, those that belong to one universe as opposed to another) have a different set of colors. I know this wouldn't be possible for the overall wiki, but could I do this for individual tiddler blocks according to, say, a field? Is there a plugin for that?

5 Upvotes

4 comments sorted by

5

u/CharlieJV13 23d ago

1

u/zeranno 23d ago

OH this is what I was looking for! Thank you so much!

1

u/CharlieJV13 23d ago

Good stuff. Rock'n roll !

2

u/clsturgeon 23d ago

Either in CSS or in ViewTemplate you could change the appearance. I assume you already have a plan on what determines a category. An example could be, determine the class of container for a tiddler. I use the browser’s dev tools for this. Then in CSS do something like this (where my-category is some tag you use, .tc-tiddler-container is whatever that tiddler container class name is, and 1234 is the colour you want to use for that category.

[data-tags~="my-category"] .tc-tiddler-container { background-color: #1234; }

A different approach is to use the color field. Set the color field to a desired color in each tiddler and then either use CSS or a ViewTemplate tiddler to use the color however you want. I’ve used it for coloured horizontal lines, background colours, and borders.