Template talk:Font color#Parameter request
{{oldtfdfull|date=2017 January 22|result=do not merge|disc=Template:Colored_link }}
{{WikiProject banner shell|
{{WikiProject Accessibility}}
}}
{{copied|from1=Template:Font_color|from_oldid1=762622105|to1=:incubator:Template:Wp/nod/font_color|to_diff1=4242016
|from2=Template:Font_color/doc|from_oldid2=824011417|to2=:incubator:Template:Wp/nod/font_color/doc|to_diff2=4242026}}
Protection
Interwiki
Please add
Edit request
{{tlx|editprotected}}
Please remove the usage section and replace it with the {{tlx|Documentation}}
template as I've created a documentation subpage at Template:Fontcolor/doc. A specific description of the request follows below. Thanks.
Change this:
{{#if:{{{3|}}}|{{{3|}}}|{{{2|}}}}}
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
To this:
{{#if:{{{3|}}}|{{{3|}}}|{{{2|}}}}}
{{Documentation}}
--Lightsup55 ( T | C ) 19:28, 23 January 2009 (UTC)
:File:Yes check.svg 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 {{para|link}} to {{tl|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 [https://en.wikipedia.org/w/index.php?search=insource%3A%2F\|\{\{font+color%2F&title=Special%3ASearch&go=Go search] shows this use is prevelant.
- {{para|link|yes}} sets the link to the test
- {{para|link|link}} sets the link to the link text
{{markup
|
|Universities Research Association
|
|{{font color/sandbox|white|blue|Universities Research Association|link=yes}}
|
|{{font color/sandbox|white|blue|Universities Research Association|link=URA}}
}}
Two problems
One, two lines of the template were setting the background colour to {{{param|{{{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 #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
Made spacing irrelevant inside
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 {{template usage|font color|( \{{!}}{{!}}\{{!}} )|0}}
and fixed a few minor things in those to feel totally right about swapping it into service.— CpiralCpiral 12:48, 13 December 2015 (UTC)
Template-protected edit request on 22 January 2017
{{edit template-protected|Template:Font color|answered=yes}}
Add {{tag|noinclude|content={{tls|tfm|Colored link}}}} to the top, as I just nominated it for merging. Noincluding as it is sometimes substituted. Pppery 02:29, 22 January 2017 (UTC)
:File:Yes check.svg Done Primefac (talk) 03:28, 22 January 2017 (UTC)
:: {{ping|Primefac}} For some reason, I always forget the syntax of {{tl|tls}}, and thus {{para|otherpage}} needs to be changed to {{para|otherpage|colored link}} in the tfm notice. Pppery 03:51, 22 January 2017 (UTC)
:File:Yes check.svg Done Primefac (talk) 03:53, 22 January 2017 (UTC)
Parameter request
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)
:{{u|Empire AS}}, {{tl|Font}} might be what you're looking for. {{u|Sdkb}} talk 07:48, 11 December 2020 (UTC)
::{{u|Sdkb}}, I know that however the problem is, that template uses named parameters but an unnamed parameter of font should be here too. Empire AS (Talk) 07:51, 11 December 2020 (UTC)
:::I'm not quite sure what you're proposing (you could mock it up the sandbox if you want to demonstrate), but generally I think it's not a good idea to expand the functionality of this template beyond just selecting the color. If we were to do that we'd just want to merge it with {{tl|Font}}. {{u|Sdkb}} talk 08:17, 11 December 2020 (UTC)
Color of link underline
Currently, if a link is colored using this template, the underline is not colored appropriately, e.g. {{font color|orange|Main Page|link=yes}}. {{tl|Colored link}} properly handles this via the CSS text-decoration: inherit
; I'd personally suggest to just shell out to {{tl|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)
Displaying different colors for light/dark modes
Is there a way to display one color in light mode and a different color in dark mode? For example, if I want to show {{font color|#0000ff|blue text}} for users using light mode, but I want to show {{font color|#7acaff|light blue text}} for users using dark mode, is there a way to do this? The Sands of Time 0 (talk) 00:26, 19 May 2025 (UTC)