Template talk:Font color
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
|
Protection
I suggest protect this template — Preceding unsigned comment added by Mac (talk • contribs) at 12:05, 16 July 2006 (UTC)
- Done. — Ilmari Karonen (talk) 13:27, 16 July 2006 (UTC)
Interwiki
Please add [[he:צבע גופן]] to this protected template. Thanks, Dovi (talk) 07:03, 15 October 2008 (UTC)
Edit request
{{editprotected}}
Please remove the usage section and replace it with the
template as I've created a documentation subpage at Template:Fontcolor/doc. A specific description of the request follows below. Thanks.
{{Documentation}}
Change this:
{{#if:{{{3|}}}|<span style="background-color:{{{2|inherit}}};color:{{{1|inherit}}};">{{{3|}}}</span>|<span style="color:{{{1|inherit}}};">{{{2|}}}</span>}}<noinclude> == Usage == '''<nowiki>{{fontcolor|text_color|background_color|text}}</nowiki>''' Examples of use: *'''<nowiki>{{fontcolor|green|this is about plants}}</nowiki>''': {{fontcolor|green|this is about plants}}:(it appears in green text). *'''<nowiki>{{fontcolor||red|text in red background}}</nowiki>''': {{fontcolor||red|text in red background}}:(no parameters are used for the text color, only for the background) *'''<nowiki>{{fontcolor|red|yellow|red text with yellow background}}</nowiki>''': {{fontcolor|red|yellow|red text with yellow background}} == See also == * [[HTML color names]] * [[List of colors]] [[Category:text color templates]] [[pt:Predefinição:Fontcolor]] [[sl:Predloga:Barvapis]] [[zh:Template:Fontcolor]] </noinclude>
To this:
{{#if:{{{3|}}}|<span style="background-color:{{{2|inherit}}};color:{{{1|inherit}}};">{{{3|}}}</span>|<span style="color:{{{1|inherit}}};">{{{2|}}}</span>}}<noinclude> <!-- Add categories and interwikis to the /doc subpage, not here! --> {{Documentation}}</noinclude>
--Lightsup55 ( T | C ) 19:28, 23 January 2009 (UTC)
- Done - Rjd0060 (talk) 02:27, 24 January 2009 (UTC)
Categorization of pages with contrast problems
See WikiProject Accessibility's talk page. Helder 19:41, 1 March 2013 (UTC)
Link
I added -- Gadget850 talk 23:25, 30 October 2014 (UTC)
One, two lines of the template were setting the background colour to {{{2}}} in the two-parameter case, where the second parameter is the text to be displayed, not a colour name.
Two, when templates are expanded as part of a signature, the software does not remove the comments. So the comment in the first Per sandbox and new testcases, named parameters now work for Space characters did not need to define colors,
nor be used in a label field to add space outside the template.
So I made the space issue go away in the sandbox and redid all the testcases.
Then I did this search link hastemplate:"font color" insource:/\{\{ *[Ff]ont color *\|[^}]*( \||\| )/ prefix::
and fixed a few minor things in those to feel totally right about swapping it into service.— CpiralCpiral 12:48, 13 December 2015 (UTC)
Add Hi, can you add a 'font-type', 'font-family' or 'font-variant' in it. It would be very helpful. Empire AS (Talk) 07:42, 11 December 2020 (UTC)
Currently, if a link is colored using this template, the underline is not colored appropriately, e.g. Main Page. {{Colored link}} properly handles this via the CSS |link=
to {{font color/sandbox}} to add a wikilink. The use is when the blue link would be non-accessible on a background such as a navbox header. A
{{font color/sandbox|white|blue|Universities Research Association|link=yes}}
{{font color/sandbox|white|blue|Universities Research Association|link=URA}}
Two problems
#if
was breaking the logic of the template; the #if was always coming out true. This behaviour could also be seen in the result from Special:ExpandTemplates. -- John of Reading (talk) 08:12, 16 December 2014 (UTC)
Added more named parameters
{{{1}}}
{{{2}}}
and {{{3}}}
.
If this is OK, yet not documented withing a while, I'll document it.
fg=1 bg=2 text=3. Link=4 was already there. — CpiralCpiral 08:30, 25 November 2015 (UTC)
Made spacing irrelevant inside
Template-protected edit request on 22 January 2017
<noinclude>{{subst:tfm|Colored link}}</noinclude>
to the top, as I just nominated it for merging. Noincluding as it is sometimes substituted. Pppery 02:29, 22 January 2017 (UTC)
|otherpage=
needs to be changed to |otherpage=colored link
in the tfm notice. Pppery 03:51, 22 January 2017 (UTC)Parameter request
Color of link underline
text-decoration: inherit
; I'd personally suggest to just shell out to {{Colored link}} when this template is used to color a link, but the CSS could also be added here directly. 「ディノ奴千?!」☎ Dinoguy1000 11:53, 12 November 2021 (UTC)