模板:Color

被永久保护的模板
维基新闻,自由的新闻源
文档图示 模板文档[查看] [编辑] [历史] [清除缓存]

Template:High-risk

本模板用于取代HTML span的前景颜色。接受RGB的16进制编码,例如:#C9E72A,或是任何的网页颜色的英文名称,如red, blue, green, moccasin, darkorchid。有关于HTML span的背景颜色,请参考{{background color}}

使用说明

  • {{color|英文顏色名稱或是RGB 16進制編碼|文字}}

范例:

Template:Tbullet Template:Tbullet

如果第二个参数被省略,将会显示下方文字:

Template:Tbullet Template:Tbullet

处理效能

本模板会产生下列的HTML span语法:

<span style="color:{{{1}}}">{{{2}}}</span>

处理速度大约每秒700次,与直接使用HTML语法几乎没有差异。

模板资料

Template:TemplateDataHeader

The color template can be used to add a span of text with any given text color

模板参数[编辑模板数据]

参数描述类型状态
Color1

CSS name of color or hex code of color, e.g. 'red' or '#00F000'.

字符串必需
Text2

The string of text to be formatted in the desired color

字符串推荐

重定向

参见