跳转到内容

模板:Background color/doc:修订间差异

来自天灾之下:危险连接资料站
bwiki>35609647
小 列表替换:替换 “分类:模板页的文档” 为 “分类:模板文档” 第 137/145 个
小 导入1个版本
第1行: 第1行:
用法:
{{Documentation subpage}}
<pre>
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
{{Background color|颜色代码|内容}}
</pre>


示例:
== Usage ==
<pre>
* {{tl|bgc}} redirects here.
{{Background color|green|绿色}}


{{Background color|#F00|红色}}
;Examples
*{{tlx|bgc|yellow|foo}} = {{bgc|yellow|foo}}
*{{tlx|bgc|#FFA8A8|foo}} = {{bgc|#FFA8A8|foo}}
*{{tlx|bgc|#FFA8A8|foo|m}} = {{bgc|#FFA8A8|foo|m}}


{{Background color|rgb(0,0,255)|蓝色}}
;Parameters
</pre>
* 1st or <code>c</code> = color
{{Background color|green|绿色}}
* 2nd or <code>t</code> = text
* <code>m</code> = monospace font


{{Background color|#F00|红色}}
;Color suggestions
* Refer to [[Design/Typography#Text color]] for details on accessible color choices.
* These colors should be fine<ref>Taken from https://jacksonlab.agronomy.wisc.edu/2016/05/23/15-level-colorblind-friendly-palette/ and then low-contrast combinations removed</ref>:
*{{tlx|bgc|#ff6db6|foobar}} = {{bgc|#ff6db6|foobar}}
*{{tlx|bgc|#ffb6db|foobar}} = {{bgc|#ffb6db|foobar}}
*{{tlx|bgc|#b66dff|foobar}} = {{bgc|#b66dff|foobar}}
*{{tlx|bgc|#6db6ff|foobar}} = {{bgc|#6db6ff|foobar}}
*{{tlx|bgc|#b6dbff|foobar}} = {{bgc|#b6dbff|foobar}}
*{{tlx|bgc|#db6d00|foobar}} = {{bgc|#db6d00|foobar}}
*{{tlx|bgc|#24ff24|foobar}} = {{bgc|#24ff24|foobar}}
*{{tlx|bgc|#ffff6d|foobar}} = {{bgc|#ffff6d|foobar}}


{{Background color|rgb(0,0,255)|蓝色}}
<references/>


<noinclude>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
[[分类:模板文档]]
<!-- Categories go here and interwikis go in Wikidata. -->
</noinclude>
 
}}</includeonly>

2025年12月16日 (二) 16:39的版本

Usage

  • {{Bgc }} redirects here.
Examples
  • {{bgc|yellow|foo}} = foo
  • {{bgc|#FFA8A8|foo}} = foo
  • {{bgc|#FFA8A8|foo|m}} = foo
Parameters
  • 1st or c = color
  • 2nd or t = text
  • m = monospace font
Color suggestions
  • Refer to Design/Typography#Text color for details on accessible color choices.
  • These colors should be fine[1]:
  • {{bgc|#ff6db6|foobar}} = foobar
  • {{bgc|#ffb6db|foobar}} = foobar
  • {{bgc|#b66dff|foobar}} = foobar
  • {{bgc|#6db6ff|foobar}} = foobar
  • {{bgc|#b6dbff|foobar}} = foobar
  • {{bgc|#db6d00|foobar}} = foobar
  • {{bgc|#24ff24|foobar}} = foobar
  • {{bgc|#ffff6d|foobar}} = foobar