Help talk:Link color

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Wikipedia Help Project (Rated NA-class, Low-importance)
WikiProject icon This page is within the scope of the Wikipedia Help Project, a collaborative effort to improve Wikipedia's help documentation for readers and contributors. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks. To browse help related resources see the Help Menu or Help Directory. Or ask for help on your talk page and a volunteer will visit you there.
 NA  This page does not require a rating on the project's quality scale.
 Low  This page has been rated as Low-importance on the project's importance scale.

Why separate[edit]

The reason I created this article, although there already is an article about different links, is that I wanted a concise explanation in the aspect of the colors. Mikael Häggström 15:52, 31 October 2007 (UTC)

Changing link colors[edit]

Should we turn external links green so they won't be mistaken for inter Wiki links? When citing sources it's easier to cite sources using green links. Some people put the inter-Wiki link color as light blue to link it as a source.--I-405 (Freeway) 00:06, 5 September 2008 (UTC)

I think we should change the color of external links to THIS (#A00080). --Amit6 (talkcontribscountglobal contribs) 13:16, 20 November 2008 (UTC)
  • English grammar corrected on 17:46, 10 July 2011 (UTC)

Visited red links[edit]

This article doesn't say what color visited red links are. (Example, click on this red link (compare to this one here later), then go back and look at its color.) C Teng [talk] 18:38, 28 November 2009 (UTC)

Looks like #A55858. --MZMcBride (talk) 19:03, 28 November 2009 (UTC)
Testing, Testing. C Teng [talk] 23:06, 10 December 2009 (UTC)
Looks good, thanks. I'll add it. — Preceding unsigned comment added by C Teng (talkcontribs)
I couldn't figure out how to do the color box stuff, though. Also, we need a color box for purple links. C Teng [talk] 23:16, 10 December 2009 (UTC)

Vector Skin[edit]

Where is the vector skin's CSS file? I can't seem to find it! (17:48, 10 July 2011 (UTC)) — Preceding unsigned comment added by (talk)

You can only customize the appearance of Wikipedia if you are logged in. Then you can edit Special:MyPage/vector.css. See more at Wikipedia:Customisation. PrimeHunter (talk) 21:49, 10 July 2011 (UTC)

Default Color hex codes for vector.css[edit]

Hey guys, thanks for this. I've sort of figured out how to use a custom style/colors for Wikipedia using this article as a guide. But instead of presenting a weird, nonstandard template for custom colors, can it just be the default settings template code that we can change ourselves to suit our own tastes? Cause I'm having problems changing some of the colors back to default. Thanks and I hope you guys understand - M0rphzone (talk) 21:48, 16 October 2011 (UTC)


Hi. I'm confused by the Help:Link color#Making links appear a different color just for you section. It reads:

/* standard link colors */
.mw-body a:link { color: #0000FF; } /* normal unvisited links */
.mw-body a:link:visited { color: #7F007F; } /* visited links */
.mw-body a:link:active { color: #FF0000; } /* active links */
.mw-body { color: #FF0000; } /* new links */
.mw-body a:link.interwiki { color: #3366BB; } /* interwiki links */
.mw-body a:link.external { color: #3366BB; } /* external links */
.mw-body a:link.stub { color: #772233; } /* hovered links */
.mw-body a:link {color: #FF0000}
.mw-body a:visited {color: #00FF00}
.mw-body a:hover {color: #FF00FF}
.mw-body a:active {color: #0000FF}

It looks like there are duplicate declarations here? It's really confusing. --MZMcBride (talk) 00:20, 10 April 2013 (UTC)

There is only one duplicate - .mw-body a:link - and it seems to have been a duplicate since the section was added. --Redrose64 (talk) 16:27, 10 April 2013 (UTC)

Light blue links[edit]

In the color table, the text describing light blue links mentions bright blue links. I could be mistaken but shouldn't it read light blue links. I am not certain enough to change it. Can someone check it please? I don't see bright blue mentioned anywhere else in the table. Thanks. Probing Mind (talk) 07:23, 26 April 2013 (UTC)

I've changed it. That text was originally added in 2008, so perhaps the interwiki links were displayed in a brighter blue back then. -- John of Reading (talk) 07:32, 26 April 2013 (UTC)
Yes, most of the link colours changed with the introduction of the Vector skin in Spring 2010. In general, the blues became darker and the purples became bluer. Reds, IIRC, remained the same. --Redrose64 (talk) 15:10, 26 April 2013 (UTC)

How to change the color of visited red links?[edit]

I have a custom stylesheet, however, my color setting are overriding the visited red links. I want to keep visited red links red, so how do I change it? My stylesheet is located here: User:Andros 1337/vector.css. ANDROS1337TALK 14:11, 3 May 2013 (UTC)

In Vector skin, the default colours for red links are      #ba0000 (like this) for unvisited links, and      #a55858 (like this) for visited red links. If you want the visited links to take on the brighter red, you could try
.mw-body { color:#ba0000; }
but surely they would then be indistinguishable from the unvisited ones? --Redrose64 (talk) 16:08, 3 May 2013 (UTC)
This worked, thanks. ANDROS1337TALK 18:32, 3 May 2013 (UTC)

How to print links in color?[edit]

When printing a wikipedia page for reading in the bus or train home, the link won't show in blue. How to change that?

08:40, 3 July 2015 (UTC) — Preceding unsigned comment added by (talk)

First, create an account (if you've not done so already) and log in. Then edit Special:MyPage/common.css and paste in the following five lines:
@media print{
a,a.external{color:#0645ad !important;}{color:#BA0000 !important;}
a.stub{color:#772233 !important;}
Save that, go back to the page concerned, and refresh it. --Redrose64 (talk) 20:44, 4 July 2015 (UTC)

How to change the color of piped links?[edit]

Is there a way to display piped links in a color of my choice? Finnusertop (talk | guestbook | contribs) 16:11, 22 July 2015 (UTC)

Have a look at my signature. --Redrose64 (talk) 16:26, 22 July 2015 (UTC)
Yes, but I mean conditionally: if any link contains the pipe character "|", it would automatically be colored. I'm talking about common.css. I can't for the life of me figure out how to look for that pipe character in a link in css. Finnusertop (talk | guestbook | contribs) 18:23, 22 July 2015 (UTC)
It's not there. The HTML for that link is <a href="/wiki/Wikipedia:Common.js_and_common.css" title="Wikipedia:Common.js and common.css">common.css</a> which has no pipe characters - notice how the href= attribute specifies the link itself, the title= attribute is a shorter version of that; and the linked text is between the <a> and </a> tags. CSS selectors can test for tags and their attributes, but they cannot test for text outside of the tags. --Redrose64 (talk) 21:38, 22 July 2015 (UTC)
Is it possible (probably with js) to go through the page's wikitext and identify the piped links that way? Finnusertop (talk | guestbook | contribs) 22:07, 22 July 2015 (UTC)
I suppose so, but I don't know how. This is getting out of scope (Help:Link color deals with purely CSS methods), you may find somebody who knows at WP:VPT. --Redrose64 (talk) 23:04, 22 July 2015 (UTC)
Adding a class to a piped link might be an addition to User:Anomie/linkclassifier by User:Anomie. I guess it could try to compare href and title in the rendered page. PrimeHunter (talk) 23:20, 22 July 2015 (UTC)
That wouldn't work: they are directly related, the title= attribute is related to the left-hand side of the piped link, not the right. So, whilst
  • [[Help:Link color]]Help:Link color which is <a href="/wiki/Help:Link_color" title="Help:Link color">Help:Link color</a>
notice that
  • [[Help:Link color|help page]]help page which is <a href="/wiki/Help:Link_color" title="Help:Link color">help page</a>
it's only the text between the tags that is different, the two attributes do not change whether the link is piped or unpiped. --Redrose64 (talk) 07:29, 23 July 2015 (UTC)
While it would be possible to compare the title with the displayed text, I'd not want to add it. Anomie 13:06, 23 July 2015 (UTC)
@Anomie: Why not? The script (which I'm a user of) already highlights redirect links - which is highly useful because it provides a visual cue that the link doesn't necessarily go exactly where the title would suggest. This helps in identifying links that point to wrong targets and missing articles that are obscured by the lack of red links. It also adds to link clarity. Without the scrip, one needs to click through links to see where they go, and in case of piped links, hover over each link. I think such a feature for piped links would be equally useful as the existing feature is for redirect links. Finnusertop (talk | guestbook | contribs) 15:54, 23 July 2015 (UTC)
Because piped links are so commonly used for good reasons that I don't see how identifying them would be anything but noise. Anomie 17:40, 23 July 2015 (UTC)
@Anomie: Yes, they are. But the script was never intended to detect things that are outright errors (with the exception of, maybe, unintentional disambiguations and self-redirecting links), was it? Some features are useful to me (say, identifying non-free images so I can check the rationales) and others I have commented out as precisely such noise (I don't care if pages are unprintworthy). Having a choice means it serves a variety of purposes. I've spent a good few hours trying to modify the script to highlight piped links for me, but I didn't get it to work. Can you please show me how; you don't have to include it as a feature in your script. Finnusertop (talk | guestbook | contribs) 20:58, 23 July 2015 (UTC)