Color/ Colour Action Documentation
This is the documentation page for the color/colour action(s).Documentation
NOTE
This feature is available since:
WikkaWiki 1.1.6.1
WikkaWiki 1.1.6.1
Short description
Renders a string as colored text.Usage:
{{color [text="This is my text"] [fg="red"] [bg="black"]}}name | type | required? | default | description |
---|---|---|---|---|
text | string | mandatory | - | the text you want to display colored |
bg | string | optional | - |
since 1.1.6.2
color name or hex-value for the background |
fg | string | optional | - |
since 1.1.6.2
foreground color, alias for c, introduced to fit with bg |
c | string | optional | - | color name or hex-value for the text |
hex | string | optional | - | alias for c, kept for backwards-compatibility; |
name | color |
---|---|
aqua | |
black | |
blue | |
fuchsia | |
gray | |
green | |
lime | |
maroon | |
navy | |
olive | |
purple | |
red | |
silver | |
teal | |
white | |
yellow |
Long description
With {{color}} action (or its alias {{colour}}) you can specify text color using either one of HTML defined names or a hex value (with the former one taking priority). An optional background color can also be specified. Note that you must specify a text and either use "fg", "c" or "hex" for the color.Examples:
{{color c="green" text="This is a test."}}This is a test.
If you want to use hex values:
{{color hex="#DD0000" text="This is another test."}}
This is another test.
Alternatively, you can specify a foreground and background color using the fg and bg parameters (they accept both named and hex values):
{{color fg="#FF0000" bg="#000000" text="This is colored text on colored background"}}
This is colored text on colored background
{{color fg="yellow" bg="black" text="This is colored text on colored background"}}
This is colored text on colored background
Release Notes
- Versions 1.1.6.1 and below had support for parameters text, c and hex only, and no check were performed about these values.
- since 1.1.6.2two new parameters bg and fg have been introduced, and the colors are checked for validity. RGB syntax, Hex syntax and a wide range of color names are supported.
- since 1.1.6.4support for a number of invalid colornames, such as antiquewhite, lightgreen, ... has been discontinued. Although these colornames are supported by almost every known browser, they do not validate against the CSS specification. Currently supported colornames are: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white and yellow.
Authors
- Nils Lindenberg (modifications)
- Mahefa Randimbisoa (modification - RGB syntax)
CategoryEN