2014-02-17 12:09:10 +00:00
created: 20140216102454178
2015-02-24 16:41:16 +00:00
modified: 20150221154036000
2014-09-11 14:52:47 +00:00
tags: Concepts
2014-02-17 12:09:10 +00:00
title: ColourPalettes
type: text/vnd.tiddlywiki
2014-12-28 09:50:19 +00:00
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:
2014-02-17 12:09:10 +00:00
```
2014-12-28 09:50:19 +00:00
page-background: #fe0
table-border: #ccc
...
2014-02-17 12:09:10 +00:00
```
2014-12-28 09:50:19 +00:00
Several palettes form part of the core. The system tiddler [[$:/palette]] always contains the title of the currently selected palette tiddler.
2015-02-24 16:41:16 +00:00
To retrieve the value of a named colour from the current palette, e.g. for use in a stylesheet tiddler, use the <<.mlink colour>> macro:
2014-02-17 12:09:10 +00:00
```
2014-12-28 09:50:19 +00:00
<<colour page-background>>
2014-02-17 12:09:10 +00:00
```
Palette tiddlers should have the following fields:
2014-12-28 09:50:19 +00:00
|!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 |