From 7290be9e47c1fa64e0b4d052736b10d4355ac5aa Mon Sep 17 00:00:00 2001 From: Astrid Elocson Date: Sun, 28 Dec 2014 09:50:19 +0000 Subject: [PATCH] Improvements to wording --- .../tiddlers/concepts/ColourPalettes.tid | 41 +++++++------------ 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/editions/tw5.com/tiddlers/concepts/ColourPalettes.tid b/editions/tw5.com/tiddlers/concepts/ColourPalettes.tid index 5b6890ca6..4e08b2d21 100644 --- a/editions/tw5.com/tiddlers/concepts/ColourPalettes.tid +++ b/editions/tw5.com/tiddlers/concepts/ColourPalettes.tid @@ -4,40 +4,29 @@ tags: Concepts title: ColourPalettes type: text/vnd.tiddlywiki -Colour palettes bind logical colour names (such as ''page-background'') to actual CSS colours (such as ''#fe0''). +A colour palette is a [[data tiddler|DataTiddlers]] that supplies a [[CSS]] colour value, such as ''yellow'' or ''#fe0'', for each of several colour names, like this: -Entire colour palettes are stored in a single [[data tiddler|DataTiddlers]]. +``` +page-background: #fe0 +table-border: #ccc +... +``` -The title of the tiddler containing the current colour palette is identified by the tiddler [[$:/palette]]. +Several palettes form part of the core. The system tiddler [[$:/palette]] always contains the title of the currently selected palette tiddler. -To retrieve a named colour from the current palette you can use the ''colour'' macro: +To retrieve the value of a named colour from the current palette, e.g. for use in a stylesheet tiddler, use the [[colour macro|$:/core/macros/CSS]]: ``` <> ``` -The ''colour'' macro is defined like this: - -``` -\define colour(name) -<$transclude tiddler={{$:/palette}} index="$name$"/> -\end -``` - -By convention, each theme provides a default colour palette in the tiddler [[$:/config/DefaultPalette]] tiddler. Thus, setting the tiddler [[$:/theme]] to the string `$:/config/DefaultPalette` will revert to the palette packaged with the current theme (as long as it hasn't been redefined, since it is a shadow tiddler). - Palette tiddlers should have the following fields: -|!Field |!Description | -|title |Any title can be used, typically a system title starting with "$:/" | -|type |`application/x-tiddler-dictionary` to identify this tiddler as a [[data tiddler|DataTiddlers]] | -|tags |`$:/tags/Palette` to identify this tiddler as a palette | -|description |Description to be displayed in palette browser | -|text |Colour definitions (see below) | +|!Name |!Value | +|title |Typically starting with `$:/` | +|type |`application/x-tiddler-dictionary` | +|tags |`$:/tags/Palette` | +|description |Displayed in the palette browser | +|text |`name: value` colour definitions | -The text of a palette tiddler consists of name value pairs like this: - -``` -foreground: #000 -background: #fff -``` +By convention, each [[theme|Themes]] provides a default colour palette in the tiddler [[$:/config/DefaultPalette]]. Thus, setting the tiddler [[$:/theme]] to the string `$:/config/DefaultPalette` will revert to the palette packaged with the current theme (as long as it hasn't been redefined, since it is a shadow tiddler).