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

    از ویکی تراث
    < الگو:Color
    نسخهٔ تاریخ ‏۴ اوت ۲۰۲۳، ساعت ۱۷:۲۰ توسط Admin (بحث | مشارکت‌ها) (۱ نسخه واردشده: الگو و پوددمانهای اصلاح شده)
    (تفاوت) → نسخهٔ قدیمی‌تر | نمایش نسخهٔ فعلی (تفاوت) | نسخهٔ جدیدتر ← (تفاوت)

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


    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:

    &lt;span style="color:{{{1}}}"&gt;{{{2}}}&lt;/span&gt;

    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

    رشتهضروری

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