توضیحات الگو[نمایش] [ویرایش] [تاریخچه] [پاکسازی]

This template can be used to specify the foreground color of a span of text. Acceptable values are RGB hex codes, e.g. #C9E72A, or any of the رنگ‌های وب: red, blue, green, moccasin, darkorchid, etc. To set the background color of a span of text, use {{Bg}}.

استفاده

  • {{color|name of color or hex code of color|Text}}

برای نمونه:

  • {{color|red|Hello, world!}} ← Hello, world!
  • {{color|#00F000|Hello, world!}} ← Hello, world!

اگر پارامتر دوم حذف شود، مقدار رنگ به صورت متن نمایش داده می‌شود:

  • {{color|#00F000}} ← #00F000
  • {{color|red}} ← red

ملاحظات عملکرد

The template generates an HTML span tag:

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

It runs at speeds in excess of 700 per second, and so is functionally identical to using the HTML markup directly.

داده‌های الگو

این، توضیحاتِ الگوداده است که توسط TemplateWizard، ویرایشگر دیداری و دیگر ابزارها استفاده می‌شود. گزارش خطای ماهیانه برای این الگو را ببینید.

الگوداده رنگ‌آمیزی

الگو 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

رشتهضروری

جستارهای وابسته