قالب:Color

من الشعر الشيعي

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

قالب:High-risk

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.

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

قالب:TemplateDataHeader

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

نصمطلوب

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