2015년 2월 21일 오후 3:13
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