Plantilla:Color del partido produce el color hexadecimal del partido político proporcionado.
{{Party color|<party name>}}
A continuación se muestran algunos ejemplos que utilizan el Partido Laborista (tenga en cuenta que hay varios nombres de entrada potenciales):
["Partido Laborista y Cooperativo"] = "Partido Laborista (Reino Unido)",["Cooperativa Laborista"] = "Partido Laborista (Reino Unido)", ...["Partido Laborista (Tailandia)"] = {abbrev = "", color = "#000000", shortname = "",},["Partido Laborista (Reino Unido)"] = {abbrev = "Lab", color = "#E4003B", shortname = "Labour",},
{{Party color|Labour Party (UK)}}
→ #E4003B{{Party color|Labour and Co-operative}}
→ #E4003B{{Party color|Labour Co-operative}}
→ #E4003BSi no se proporciona el grupo o no se almacena el color para el grupo, se devolverá un error. Tenga en cuenta que si el grupo no está en el módulo (tercer ejemplo a continuación), se devolverá el color predeterminado #F8F9FA.
{{Party color}}
→ El parámetro 1 debe ser el nombre de una fiesta.{{Party color|A test no values}}
→ Valor no incluido en la plantilla. Solicite que se agregue.{{Party color|Not-a-party}}
→ #F8F9FAPara evitar generar un error de script, utilice |error=value
. Tenga en cuenta que este valor de error también se pasará si la parte no está almacenada en el módulo.
{{Party color|A test no values|error=ERROR}}
→ ERROR{{Party color|Not-a-party|error=ERROR}}
→ ERROR