This page is part of a static HTML representation of the TiddlyWiki at

contrastcolour Macro

21st February 2015 at 3:13pm
Core Macros Macros

The contrastcolour macro returns whichever of two given CSS colours is deemed to contrast best with another.

An example can be seen in the template tiddler for tag pills.


The colour to contrast against (typically a background colour)
An alternative colour to contrast against. This is used when target is undefined or not a valid colour
The first of the two colours to choose between
The second of the two colours to choose between