Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

Template:Color

Permanently protected template
From Wikibooks, open books for an open world

{{{2}}}

Template documentation[view] [edit] [history] [purge]
WarningThis template is used on463,000+ pages, or roughly 157% of all pages.
To avoid major disruption and server load, any changes should be tested in the template's/sandbox or/testcases subpages, or in your ownuser subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on thediscussion page before implementing them.


Usage

You can set text in color names, HEX, RGB, RGBA, HSL and HSLA. HWB, LAB, LCH, OKLAB and OKLCH can also be used, but they are not advised as these are too new to be used.

{{color|red|Hello, world!}} results inHello, world!

{{color|#00F000|Hello, world!}} results inHello, world!

{{color|rgb(51,102,255)|Hello, world!|hsl(299, 89%, 91%)}} results inHello, world!

SeeWeb colors for a list of colors.

See also

  • {{red}} -This is some text in red
  • {{orange}} -This is some text in orange
  • {{amber}} -This is some text in amber
  • {{gold}} -This is some text in gold
  • {{yellow}} -This is some text in yellow
  • {{lime}} -This is some text in lime
  • {{aqua}} -This is some text in aqua
  • {{blue}} -This is some text in blue
  • {{navy}} -This is some text in navy
  • {{fuchsia}} -This is some text in fuchsia
  • {{pink}} -This is some text in pink
  • {{maroon}} -This is some text in maroon
  • {{brown}} -This is some text in brown
  • {{olive}} -This is some text in olive
  • {{green}} -This is some text in green
  • {{teal}} -This is some text in teal
  • {{cyan}} -This is some text in cyan
  • {{purple}} -This is some text in purple
  • {{magenta}} -This is some text in magenta
  • {{white}} -This is some text in white
  • {{silver}} -This is some text in silver
  • {{grey}} -This is some text in grey
  • {{black}} -This is some text in black


No description.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Color1

Color of text

Example
red
Stringrequired
Text2

Text string where a color is applied

Stringrequired
Background color3

Background color of text

Example
yellow
Stringoptional
The abovedocumentation istranscluded fromTemplate:Color/doc.(edit |history)
Editors can experiment in this template's sandbox(create |mirror) and testcases(create) pages.
Add categories to the/doc subpage.Subpages of this template.
Retrieved from "https://en.wikibooks.org/w/index.php?title=Template:Color&oldid=4451038"
Category:
Hidden category:

[8]ページ先頭

©2009-2026 Movatter.jp