Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 Example  





3 TemplateData  














Template:Canadian party colour






Ελληνικά
فارسی
Français
ि
Bahasa Indonesia


Русский
Scots
Simple English
Slovenščina

Tiếng Vit


 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


#DCDCDC

This template can be used to standardize the colours used to represent Canadian political parties in tables, lists, and templates. Enter the jurisdiction and party name, and this template will produce the hex colour code for that party. In tables, this template can start a new row with one cell containing the colour and the next cell containing a wikilink to the article about that party.

A full list of available party names is at Wikipedia:WikiProject Political parties and politicians in Canada/list of parties.

Usage

Where Jur is the jurisdiction, being one of: CA, AB, BC, MB, NB, NS, NF, NL, NT, NU, ON, PE, QC, SK, YK, YT, EDM, MTL, VAN

Example

{|class="wikitable"
{{Canadian party colour|BC|NDP|row-name}}
| This is the common row-name usage.
{{Canadian party colour|MB|CoR|row-name|short}}
| Without the "short" parameter, this would have given the full name [[Manitoba Confederation of Regions Party|Confederation of Regions]].
{{Canadian party colour|BC|Liberal|row}}
| "row" allows custom text in the first cell.
| And, as usual, the second cell.
|-
| {{Canadian party colour|CA|PC|background}} | '''1867'''
| "background" allows text on the colour.
| Note that when using the "background" parameter you have to manually create new rows using <nowiki>|-</nowiki>
{{Canadian party colour|XX|Liberal|row-name}}
| This row uses "XX" for jurisdiction. Invalid jurisdictions (or jurisdictions without a party by that name) will sometimes find a default colour.
{{Canadian party colour|ON|Invalid text|row-name}}
| This row uses "Invalid text" as the party name. Invalid party names will default to the colour for independent candidates and will use the exact text entered when using the "row-name" function, including wikilinks. This can be used for parties that only ever run one candidate.
|}

Will produce:

New Democratic This is the common row-name usage.
Conf of Regions Without the "short" parameter, this would have given the full name Confederation of Regions.
  "row" allows custom text in the first cell. And, as usual, the second cell.
1867 "background" allows text on the colour. Note that when using the "background" parameter you have to manually create new rows using |-
Liberal This row uses "XX" for jurisdiction. Invalid jurisdictions (or jurisdictions without a party by that name) will sometimes find a default colour.
Invalid text This row uses "Invalid text" as the party name. Invalid party names will default to the colour for independent candidates and will use the exact text entered when using the "row-name" function, including wikilinks. This can be used for parties that only ever run one candidate.

TemplateData

This template produces the name and standardized colour for Canadian political parties.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Jurisdiction1

Which province, territory, city, or the federal level

Suggested values
CA AB BC MB NS NL NT NU ON PE QC SK YT EDM MTL VAN
Linerequired
Party2

Name of the political party, based on the list at Wikipedia:WikiProject Political parties and politicians in Canada/list of parties

Linerequired
Format3

How the content should be displayed

Suggested values
background nohash name colour&name row row-name
Lineoptional
Short name4

Whether to use a form of the name with 15 or fewer characters

Suggested values
short
Lineoptional

Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Canadian_party_colour&oldid=1232623626"

Category: 
Canada political party color templates
Hidden category: 
Wikipedia template-protected templates
 



This page was last edited on 4 July 2024, at 18:21 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki