Revision [513]
This is an old revision of ColorActionInfo made by DotMG on 2008-01-30 00:37:34.
Color/ Colour Action Documentation
This is the documentation page for the Color / Colour action(s).Once the planned 'autodoc' feature for actions is "live", this page will contain the automatically-generated documentation by just including an action; for now, I've just manually created the text.
Documentation
Short description
Renders a string as colored text.Parameters
name | type | required? | default | description |
---|---|---|---|---|
text | string | mandatory | - | the text you want to display colored |
c | string | optional | - | name or hex-value of the color for the text |
bg
since 1.1.6.2
| string | optional | - | name or hex-value for the backgroundcolor |
fg
since 1.1.6.2
| string | optional | - | alias for 'c', introduced to fit with 'bg' |
hex | string | optional | - | alias for 'c', kept for backwards-compatibility; |
Long description
With the actions "color" and "colour" (the later one is a synonymon) you can specify the color either as one of HTML defined names or as a hex-value (with the former one taking priority). An optional background color can also be specified.Note that you must add a text and either use "fg", "c" or "hex" for the color.
Usage:
{{color [text="This is my text"] [c="red"]}}
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.
- For versions 1.1.6.2 and 1.1.6.3, parameters bg and fg were introduced, and the colors were checked for validity. RGB syntax, Hex syntax and a wide range of color names were supported.
- Since 1.1.6.4, support for a number of invalid colornames, like antiquewhite, lightgreen, ... where removed, as these colornames, though supported by almost every known browser, aren't validating against CSS specification. Supported colornames are now: '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