跳转到内容

Template:Color

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

本模板用於取代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}} → #00F000
  • {{color|red}} → red

處理效能

本模板會產生下列的HTML span語法:

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

處理速度大約每秒700次,與直接使用HTML語法幾乎沒有差異。

模板資料

以下是该模板的模板数据,适用于可视化编辑器等工具。

Color模板数据

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

字符串推荐

重定向

参见

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy