1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-05 11:43:16 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/concepts/ColourPalettes.tid
2014-12-28 09:50:19 +00:00

33 lines
1.2 KiB
Plaintext

created: 20140216102454178
modified: 20140216102722184
tags: Concepts
title: ColourPalettes
type: text/vnd.tiddlywiki
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:
```
page-background: #fe0
table-border: #ccc
...
```
Several palettes form part of the core. The system tiddler [[$:/palette]] always contains the title of the currently selected palette tiddler.
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]]:
```
<<colour page-background>>
```
Palette tiddlers should have the following fields:
|!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 |
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).