This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

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.

Parameters

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