wiki:ColorMacro

Color foreground and background of text

Description

This is a macro that allows you to change the background color of a piece of text. This is useful for highlighting text that you want to draw attention to, or applying a RAG (red, amber, green) status to progress reports.

Usage:

[[Color(background-color, color, text)]] 

or:

[[Color(color, text)]]

Where color is a color keyword or hex color number recognised by your browser and text is your text. Commas are allowed, but '(' and ')' cause a problem.

Example:

  [[Color(red, This has a red background)]]
  [[Color(lightblue, green, This has a lightblue background and green text)]]
  [[Color(none, #0000bb, I'm using a hex color)]]

which would then render as:

This has a red background


This has a lightblue background and green text


I'm using a hex color

Note: The effect of this macro could also be achieved out-of-the-box in Trac (>= 0.11.8) by span macro, see WikiHtml for details. Example usage of span macro:

[[span(''WORLD'', style=color: green)]]

Bugs/Feature Requests

Existing bugs and feature requests for ColorMacro are here.

If you have any issues, create a new ticket.

defect

3 / 7

enhancement

4 / 4

task

1 / 2

Download

Download the zipped source from here.

Source

You can check out ColorMacro from here using Subversion, or browse the source with Trac.

Recent Changes

15929 by rjollos on 2016-10-18 00:27:00
1.0: Change format of version metadata
15922 by rjollos on 2016-10-18 00:04:00
1.0: Format metadata
15901 by rjollos on 2016-09-20 23:10:25
1.0: Add plugin metadata
(more)

Author/Contributors

Author: diroussel
Maintainer: David Roussel
Contributors:

Last modified 2 months ago Last modified on Sep 21, 2016, 9:25:50 AM