Template:Color swatch
{{{2}}}
{{{1}}}
| This template uses TemplateStyles: |
Usage
Creates a color swatch for use in articles.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Color | 1 | Color, as a CSS-compatible color.
| String | required |
| Title | 2 | The main caption. Appears once, beneath the swatch. Adding a reference is recommended.
| Line | required |
| Float | 3 | Specifies the direction to float, if any: "left", "right" or "center". (Note that centering is not technically floating.)
| String | optional |
| Internal caption | 4 | Optional; appears in the swatch and below the title. | Line | optional |
| Text color | 5 | The color of the text that is overlayed onto the swatch.
| String | optional |
Samples
Blue
#0000FF
We strongly recommend adding a <ref></ref> to the main title, e.g.:
{{color swatch|#0000FF|Blue<ref>[http://www.w3.org/TR/REC-html40/types.html#h-6.5 HTML 4.01 Specification]</ref>}} creates:Blue[1]
#0000FF
Optional parameters – floating right, and an internal caption:
{{color swatch|#0000FF|Blue|right|#0000FF}} creates:Blue
#0000FF
Change the internal caption's color with a fifth value:
{{color swatch|#0000FF|Blue|right|#0000FF|white}} creates:Blue
#0000FF
Note
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.