Hi all,
Sorry about TL;DR - just excited about Tix - finally! good foundation - see it going places no one’s gone before.
Tix is going to be the core UI component of a wiki I’m building for my brother, Mike. He still uses a wiki I made for him 10 years ago! He called and was having import issues “I go into the back stage area and bring up Import …” - I forgot TiddlyWiki even had a BackStageArea, had to look it up. So time for a rewrite. Is a testimate of how useful, ageless, and priceless TiddlyWiki really is!
But anyway…
Kicking Tix tires and discovered the palettes, especially the dark ones, sometimes apply colors where the background and foreground are the same or very close to the same color. For example, if you:
- Load up Tix-v0.8
- Open ControlPanel → Appearance → Palettes (probably already there)
- SideBar → Design → Page (should already be there too)
Look in the Design Page tab ‘text zoom’ legend and both the slider and textbox display fine. The default palette ‘Vanilla’ displays correctly.
- Select the ‘Spartan Night’ palette in the ControlPanel.
The textbox value is actually there - but the fore/background are almost identical colors. Also notice the slider-thumb has disappeared - is also there but is Transparent. (can’t come up any reason for a transparent slider-thumb - a poor man’s progress bar maybe?)
-
Obvious and quick solution is to edit each offending class in the palette and set with HTML color codes, so at least the back and foreground of elements of interest are presentable. Basically hard code it. Upgrades to core palettes would not take effect since are overridden. Cloning is not much better - as would double the number of palettes, most (barring a few classes) are duplicates as Core and Tix both in the active palette list.
-
Use stylesheets to override offending classes. A little bit of fancy footwork needed when switching palettes. Find/unload current stylesheet from DOM and load new one based on ‘$:/palette’ text field. Ugly bandaid, tho upgrades of core palettes for a majority of classes would still take effect.
Color values in the palette can be a HTML color codes or references to other color codes defined in the palette. In the Spartan Night palette the ‘alert-background’ class entry references ‘background’. Changing the ‘background’ color code changes ‘alert-background’ as well.
By harmonizing these fore/background references of interacting element classes one can make a theme.
- So, another solution is to design templates making a common pattern of references to colors. Basically a theme. Over simplified, a theme has a set of Hues (colors), there are 360 possible Hues (each degree on the color wheel), Solarize theme has 24 Hues - some unused. Two other values for each color are percentages of the Hue - saturation and lightness (HSL). By changing a few core colors (like primary background and foreground - normally are 6 to 8 core colors in a 24 color palette) a computer can do some of the grunt work by adjusting the other colors using deltas and offsets of HSL values.
So SolarizedLight can become SolarizedDark, SolarizedSunrise, etc. by changing a few base colors. The class references remain the same (ie: the Solarized theme). Sadly, for each new palette manual tweaks and adjustments of the colors are normally be required for aesthetics.
- My ultimate goal. With TW under the hood, Tix Xperience driving, build an interface where the the end user adjusts the core colors in a theme. So they can say “This one kinda yellowish-red, hmmm… ‘SolarizedSunset’ Perfect!”. Long way off, getting ready to take that first step, hope is not off a cliff!
I’m going to do 1) anyway, build a test page or two of TW and Tix elements, override the few classes in the palettes not working, commit on GitHub. Looks like some are already done - will snag those so palettes are all in one place.
Depending on feedback on #3 (is this the best option?, do you even want it done?). Option #3 is pretty labor intensive so got to spec out the project (gonna use Tix - drink our own poison), throw around some ideas, feedback, dig deeper into TW5s palette system which looks pretty robust, what themes to do, build a prototype - see if can carve out enough time. Figuring on 5 theme templates - that should give at least a light and a dark palette for each - totaling 10 new palettes.
At first blush - think I have energy and the time, hopefully the skill. I haven’t even searched yet for stuff that is already out there. Have used TW for years - time to give something back.
Please advise.
poc2go
PotOfCoffee2Go