For faster navigation, this Iframe is preloading the Wikiwand page for
模板:Color.
![警告](https://upload.wikimedia.org/wikipedia/commons/thumb/7/74/Ambox_warning_yellow.svg/40px-Ambox_warning_yellow.svg.png) | 此模板被引用于约54,000个页面。 为了避免造成大规模的影响,所有对此模板的编辑应先于沙盒、测试样例或您的沙盒上测试。 测试后无误的版本可以一次性地加入此模板中,但是修改前请务必于讨论页发起讨论。
模板引用数量会自动更新。 |
本模板用于取代HTML span的前景颜色。接受RGB的16进制编码,例如:#C9E72A,或是任何的网页颜色的英文名称,如red, blue, green, moccasin, darkorchid。有关于HTML span的背景颜色,请参考((background color))
使用说明
((color|英文顏色名稱或是RGB 16進制編碼|文字))
范例:
((color|red|Hello, world!))
→ Hello, world!
((color|#00F000|Hello, world!))
→ Hello, world!
如果第二个参数被省略,将会显示下方文字:
((color|#00F000))
→ (({2))}
((color|red))
→ (({2))}
处理效能
本模板会产生下列的HTML span语法:
<span style="color:(({1))}">(({2))}</span>
处理速度大约每秒700次,与直接使用HTML语法几乎没有差异。
模板资料
模板参数[编辑模板数据]
参数 | 描述 | 类型 | 状态 |
---|
Color | 1 | CSS name of color or hex code of color, e.g. 'red' or '#00F000'.
| 字符串 | 必需 |
---|
Text | 2 | The string of text to be formatted in the desired color
| 字符串 | 推荐 |
---|
重定向
参见
{{bottomLinkPreText}}
{{bottomLinkText}}
This page is based on a Wikipedia article written by
contributors (read/edit).
Text is available under the
CC BY-SA 4.0 license; additional terms may apply.
Images, videos and audio are available under their respective licenses.
{{current.index+1}} of {{items.length}}
Thanks for reporting this video!
This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:
An extension you use may be preventing Wikiwand articles from loading properly.
If you're using HTTPS Everywhere or you're unable to access any article on Wikiwand, please consider switching to HTTPS (https://www.wikiwand.com).
An extension you use may be preventing Wikiwand articles from loading properly.
If you are using an Ad-Blocker, it might have mistakenly blocked our content.
You will need to temporarily disable your Ad-blocker to view this page.
✕
This article was just edited, click to reload
Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}
Follow Us
Don't forget to rate us
Oh no, there's been an error
Please help us solve this error by emailing us at
support@wikiwand.com
Let us know what you've done that caused this error, what browser you're using, and whether you have any special extensions/add-ons installed.
Thank you!