Help:Link color


In Wikipedia, the color of a link shows the status of the corresponding target page. The default colors (in the Vector skin) have the following meanings: See also Wikipedia:Manual of Style/Accessibility/Colors.

Link style Type Color Color
blue linklink to a Wikipedia page that currently exists#0645AD = rgb(6,69,173) 
dark blue linklink to a Wikipedia page that exists and that you have visited#0B0080 = rgb(11,0,128) 
red linklink to a page that does not currently exist within Wikipedia#BA0000 = rgb(186,0,0) 
light brown linklink to a Wikipedia page that does not exist, but that you have visited#A55858 = rgb(165,88,88) 
brown linklink to a very short article within Wikipedia, but only if the user has set a preference option to format "stub" links in this way#772233 = rgb(119,34,51) 
light blue link 1
light blue link 2
link to a page at another wiki, usually another Wikimedia project or an external link
Note that the light blue color is used whether or not the page actually exists at the target wiki. For example, there is an article about George Washington Carver here on the English Wikipedia, while there is no article of the same name on the Japanese Wikipedia; but they do have an article about the same man under a different title.
#3366BB = rgb(51,102,187) 
purple linklink to a page on another site that has been visited#663366 = rgb(102,51,102) 

Note that the colors in the boxes may appear darker than text of the same color; also, larger or bold text will tend to look darker. Furthermore, the actual color seen by a user will vary slightly according to their operating system, desktop settings, and browser, as well as their monitor and (for low-end LCDs) viewing angle. Logged-in users can also change the colors they see by selecting a different skin or using custom CSS.

Custom colors


Normal text

For normal text the {{color}} template with two parameters can be used; name of color or hex code of color and text. However, prose text intended for readers should never be manually colored. (MOS:PROSECOLOR)

{{color|orange|Hello, world!}}Hello, world!

{{color|#00F000|Hello, world!}}Hello, world!

Links

Refrain from implementing colored links that may impede user ability to distinguish links from regular text, or color links for purely aesthetic reasons. (MOS:COLOR)

Styling individual links on a page

You can set the color of an individual link or set of links on page (rather than a global change to the style of all links on Wikipedia) as follows. Setting styles in this way will apply to everyone who views those particular links or that particular page, not just you. However, links intended for readers should never be manually colored.(MOS:LINKCOLOR)

The {{Colored link}} template takes two parameters to function : the color of the link, the article being linked to, and a optional third parameter for alternative text to display as a piped link.

{{colored link|orange|Canada}}Canada

{{colored link|#00F000|Page name to link|Alternative text}}Alternative text

Or

You can turn links a different color like so:

Markup
*[[example|<span style="color:Orange;">This page exists.</span>]]
*[[exampl|<span style="color:green;">This page does not exist.</span>]]
Renders as

Or, if you desire existence checking you can try:

Markup
*[[example|{{#ifexist: example|<span style="color:Orange;">This page exists.</span>|This page does not exist.}}]]
*[[exampl|{{#ifexist: exampl|<span style="color:green;">This page exists.</span>|This page does not exist.}}]]
Renders as

Styling all links just for you

You can also customize link colors by editing the CSS at your skin subpage. This is a change which will apply to all links throughout the site, but will only be visible to you

The standard link selectors are:

  • a:link — defines the style for normal unvisited links
  • a:visited — defines the style for visited links
  • a:active — defines the style for active links; links become active once you click on them
  • a:hover — defines the style for hovered links; links hover when the mouse moves over it

Colors are defined by hexadecimal characters: see web colors.

/* standard link colors */
.mw-body-content a:link { color: #0000FF; } /* normal unvisited links */
.mw-body-content a:link:visited { color: #0B0080; } /* visited links */
.mw-body-content a:link:active { color: #FF0000; } /* active links */
.mw-body-content a:link.new { color: #FF0000; } /* new links */
.mw-body-content a:link.extiw { color: #3366BB; } /* interwiki links */
.mw-body-content a:link.external { color: #3366BB; } /* external links */
.mw-body-content a:link.stub { color: #772233; } /* hovered links */

.mw-body-content a:link {color: #FF0000}
.mw-body-content a:visited {color: #00FF00}
.mw-body-content a:hover {color: #FF00FF}
.mw-body-content a:active {color: #0000FF}

Notes:

  • a:hover must come after a:link and a:visited
  • a:active must come after a:hover
  • you need to have ".mw-body-content" in front of the standard link definition, because otherwise the default definition on this website will still take precedence over what you have defined.
Redirect

Show redirects as green links:

.mw-body-content a.mw-redirect {color:#308050}
.mw-body-content a.mw-redirect:visited {color:#3070A0}
External

Show external links as green links:

.mw-body-content a.external {color: #008000}
.mw-body-content a.external:visited {color: #008000}
Text decoration

This allows formatting such as underlines. For example:

.mw-body-content a:link {color: #000000; text-decoration: underline; }

Possible values are:

  • none
  • underline
  • overline
  • line-through
Font family

This will change the link font:

.mw-body-content a:link {font-family: monospace}
Preferences

The "display links to disambiguation pages in orange" feature, located in the gadgets tab of the preferences menu (under the "appearance" section), shows you all links to disambiguation pages in orange.

Scripts

User:Anomie/linkclassifier is a popular script that customizes colors to indicate links such as pages to be deleted, nonfree-media, redirects, protected pages and more.

See also


HTML name Hex code
R  G  B
Decimal code
R   G   B
Pink colors
PinkFF C0 CB255 192 203
LightPinkFF B6 C1255 182 193
HotPinkFF 69 B4255 105 180
DeepPinkFF 14 93255  20 147
PaleVioletRedDB 70 93219 112 147
MediumVioletRedC7 15 85199  21 133
Red colors
LightSalmonFF A0 7A255 160 122
SalmonFA 80 72250 128 114
DarkSalmonE9 96 7A233 150 122
LightCoralF0 80 80240 128 128
IndianRedCD 5C 5C205  92  92
CrimsonDC 14 3C220  20  60
FireBrickB2 22 22178  34  34
DarkRed8B 00 00139   0   0
RedFF 00 00255   0   0
Orange colors
OrangeRedFF 45 00255  69   0
TomatoFF 63 47255  99  71
CoralFF 7F 50255 127  80
DarkOrangeFF 8C 00255 140   0
OrangeFF A5 00255 165   0
GoldFF D7 00255 215   0
Yellow colors
YellowFF FF 00255 255   0
LightYellowFF FF E0255 255 224
LemonChiffonFF FA CD255 250 205
LightGoldenrodYellowFA FA D2250 250 210
PapayaWhipFF EF D5255 239 213
MoccasinFF E4 B5255 228 181
PeachPuffFF DA B9255 218 185
PaleGoldenrodEE E8 AA238 232 170
KhakiF0 E6 8C240 230 140
DarkKhakiBD B7 6B189 183 107
Brown colors
CornsilkFF F8 DC255 248 220
BlanchedAlmondFF EB CD255 235 205
BisqueFF E4 C4255 228 196
NavajoWhiteFF DE AD255 222 173
WheatF5 DE B3245 222 179
BurlyWoodDE B8 87222 184 135
TanD2 B4 8C210 180 140
RosyBrownBC 8F 8F188 143 143
SandyBrownF4 A4 60244 164  96
GoldenrodDA A5 20218 165  32
DarkGoldenrodB8 86 0B184 134  11
PeruCD 85 3F205 133  63
ChocolateD2 69 1E210 105  30
SaddleBrown8B 45 13139  69  19
SiennaA0 52 2D160  82  45
BrownA5 2A 2A165  42  42
Maroon80 00 00128   0   0
Green colors
DarkOliveGreen55 6B 2F 85 107  47
Olive80 80 00128 128   0
OliveDrab6B 8E 23107 142  35
YellowGreen9A CD 32154 205  50
LimeGreen32 CD 32 50 205  50
Lime00 FF 00  0 255   0
LawnGreen7C FC 00124 252   0
Chartreuse7F FF 00127 255   0
GreenYellowAD FF 2F173 255  47
SpringGreen00 FF 7F  0 255 127
MediumSpringGreen00 FA 9A  0 250 154
LightGreen90 EE 90144 238 144
PaleGreen98 FB 98152 251 152
DarkSeaGreen8F BC 8F143 188 143
MediumSeaGreen3C B3 71 60 179 113
SeaGreen2E 8B 57 46 139  87
ForestGreen22 8B 22 34 139  34
Green00 80 00  0 128   0
DarkGreen00 64 00  0 100   0
Cyan colors
MediumAquamarine66 CD AA102 205 170
Cyan00 FF FF  0 255 255
LightCyanE0 FF FF224 255 255
PaleTurquoiseAF EE EE175 238 238
Aquamarine7F FF D4127 255 212
Turquoise40 E0 D0 64 224 208
MediumTurquoise48 D1 CC 72 209 204
DarkTurquoise00 CE D1  0 206 209
LightSeaGreen20 B2 AA 32 178 170
CadetBlue5F 9E A0 95 158 160
DarkCyan00 8B 8B  0 139 139
Teal00 80 80  0 128 128
Blue colors
LightSteelBlueB0 C4 DE176 196 222
PowderBlueB0 E0 E6176 224 230
LightBlueAD D8 E6173 216 230
SkyBlue87 CE EB135 206 235
LightSkyBlue87 CE FA135 206 250
DeepSkyBlue00 BF FF  0 191 255
DodgerBlue1E 90 FF 30 144 255
CornflowerBlue64 95 ED100 149 237
SteelBlue46 82 B4 70 130 180
RoyalBlue41 69 E1 65 105 225
Blue00 00 FF  0   0 255
MediumBlue00 00 CD  0   0 205
DarkBlue00 00 8B  0   0 139
Navy00 00 80  0   0 128
MidnightBlue19 19 70 25  25 112
Purple colors
LavenderE6 E6 FA230 230 250
ThistleD8 BF D8216 191 216
PlumDD A0 DD221 160 221
VioletEE 82 EE238 130 238
OrchidDA 70 D6218 112 214
MagentaFF 00 FF255   0 255
MediumOrchidBA 55 D3186  85 211
MediumPurple93 70 DB147 112 219
BlueViolet8A 2B E2138  43 226
DarkViolet94 00 D3148   0 211
DarkOrchid99 32 CC153  50 204
DarkMagenta8B 00 8B139   0 139
Purple80 00 80128   0 128
Indigo4B 00 82 75   0 130
DarkSlateBlue48 3D 8B 72  61 139
SlateBlue6A 5A CD106  90 205
MediumSlateBlue7B 68 EE123 104 238
White/Gray/Black colors
WhiteFF FF FF255 255 255
SnowFF FA FA255 250 250
HoneydewF0 FF F0240 255 240
MintCreamF5 FF FA245 255 250
AzureF0 FF FF240 255 255
AliceBlueF0 F8 FF240 248 255
GhostWhiteF8 F8 FF248 248 255
WhiteSmokeF5 F5 F5245 245 245
SeashellFF F5 EE255 245 238
BeigeF5 F5 DC245 245 220
OldLaceFD F5 E6253 245 230
FloralWhiteFF FA F0255 250 240
IvoryFF FF F0255 255 240
AntiqueWhiteFA EB D7250 235 215
LinenFA F0 E6250 240 230
LavenderBlushFF F0 F5255 240 245
MistyRoseFF E4 E1255 228 225
GainsboroDC DC DC220 220 220
LightGrayD3 D3 D3211 211 211
SilverC0 C0 C0192 192 192
DarkGrayA9 A9 A9169 169 169
Gray80 80 80128 128 128
DimGray69 69 69105 105 105
LightSlateGray77 88 99119 136 153
SlateGray70 80 90112 128 144
DarkSlateGray2F 4F 4F 47  79  79
Black00 00 00  0   0   0