Template:Igen/cbx
This Image generation subtemplate performs a display of color boxes, by e.g. {{Legend}}. Template:Lua
- Transclusion (Igen)
- only one parameter: either a color name (e.g. "lime") or a color triplet (e.g. "#FC23C4" or "#F0F")
- a parameter pair, like above plus a display text separated by a slash "/",
- or the slash only for an empty second parameter (the first parameter will be used)
- more parameters pairs, like that, separated by slashes
In any of these cases this string can be preceded by a control code pair, e.g. "+/ ";
the first code may be missing, or a "+" to generate a field name; the second parameter may be
- missing for
"legend" was not recognized as a supported language code."legend" was not recognized as a supported language code. "legend" was not recognized as a supported language code. with parameter pairs,
- a "-" for
"legend-small" was not recognized as a supported language code."legend-small" was not recognized as a supported language code. "legend-small" was not recognized as a supported language code. with parameter pairs ¹)
- a "L" for the
"legend" was not recognized as a supported language code."legend" was not recognized as a supported language code. "legend" was not recognized as a supported language code. with single parameter values ²)
- a "B" for
"colorbox" was not recognized as a supported language code."colorbox" was not recognized as a supported language code. "colorbox" was not recognized as a supported language code. with single parameter values
- a "S" for
"legend-small" was not recognized as a supported language code."legend-small" was not recognized as a supported language code. "legend-small" was not recognized as a supported language code. with single parameter values
- a "D" for
"colorbox" was not recognized as a supported language code."colorbox" was not recognized as a supported language code. "colorbox" was not recognized as a supported language code. with parameter pairs
- a "T" for
"tbc" was not recognized as a supported language code."tbc" was not recognized as a supported language code. "tbc" was not recognized as a supported language code. with parameter pairs
- ¹) the "-" possibility can also be expressed with an "M" or "C" (caption "Color")
- ²) the "L" possibility exists just for completion – normally a "Legend" without an explaining second value will not be useful.
- Transclusion (Igen/cbx)
All slashes are replaced by pipes, so this template gets a row of unnamed parameters.
When the second parameter of a pair is missing, the first parameter will be displayed instead.
When the first parameter of such a pair is empty, the template terminates.
Template Igen/cbox and LUA module Color2dec is used.
See examples at Template:ColorString and the talk page.