For faster navigation, this Iframe is preloading the Wikiwand page for
Template:Color.
![警告](https://upload.wikimedia.org/wikipedia/commons/thumb/7/74/Ambox_warning_yellow.svg/40px-Ambox_warning_yellow.svg.png) | 此Template被引用於約54,000個頁面。 為了避免造成大規模的影響,所有對此Template的編輯應先於沙盒、測試樣例或您的沙盒上測試。 測試後無誤的版本可以一次性地加入此Template中,但是修改前請務必於討論頁發起討論。
模板引用數量會自動更新。 |
本模板用於取代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!