الگو:Color/توضیحات

    از ویکی تراث

    ادبیات آیینی:صفحه‌های توضیحات الگو


    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}} → {{{2}}}
    • {{color|red}} → {{{2}}}

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

    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

    رشتهضروری

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