Brickipedia:How to add an Infobox Colour

From Brickipedia, the LEGO Wiki
The Infobox System - How to add an Infobox Colour
We have many different coloured infoboxes.

In order to add an infobox colour, there are three templates you need to edit; {{Header}}, {{Background}}, and {{TitleTextColour}}. The process is more complicated if you are adding a colour for a subtheme.

Adding a Theme Colour[edit source]

Editing Template:Header[edit source]

To add the header colour, you need to add the following code to {{Header}}:

|YOUR THEME IN CAPS = #COLOUR

The colour needs to be in hex colour mode and have a hash "#" in front of it, or one of the sixteen defined colour names.

Try too add it in alphabetical order, as this make it easier to see which themes are in place on the template.

Editing Template:Background[edit source]

To add the background colour, you need to add the following code to {{Background}}:

|YOUR THEME IN CAPS = #COLOUR

The colour needs to be in hex colour mode and have a hash "#" in front of it, or one of the sixteen defined colour names.

Try too add it in alphabetical order, as this make it easier to see which themes are in place on the template.

Editing Template:TitleTextColour[edit source]

You only need to add to this if your colour scheme uses white title text. If it uses black, you can skip this step, (and leave {{TitleTextColour}} empty for your theme) as black is the default anyway.

To add the theme, you need to add the following code to the template

|YOUR THEME IN CAPS

The "|" is extremely important.

You must add it after the "#default", but before the indented sections. (These are subthemes. See further down.)

Try too add it in alphabetical order, as this make it easier to see which themes are in place on the template.

Adding a Subtheme Colour[edit source]

Editing Template:Header[edit source]

Adding a subtheme colour is a bit harder. You need to add the following code to {{Header}}:

|MAIN THEME = {{#switch: {{GetTheme|Theme={{{Theme}}}|Position=2}}
          |SUBTHEME1 = #COLOUR
          |SUBTHEME2 = #COLOUR
          |#default = #COLOUR FOR THE MAIN THEME
          }}

You can have as many or as few subthemes as is necessary.

For example, for Castle and it's subthemes, it would look like this:

|CASTLE = {{#switch: {{GetTheme|Theme={{{Theme}}}|Position=2}}
          |CASTLE (2007) = #209921
          |KINGDOMS = #008132
          |#default = #D44822
          }}

Try too add it in alphabetical order from the main colour, as this make it easier to see which themes are in place on the template.

Editing Template:Background[edit source]

To add the background colour, you need to add the following code to {{Background}}:

|MAIN THEME = {{#switch: {{GetTheme|Theme={{{Theme}}}|Position=2}}
          |SUBTHEME1 = #COLOUR
          |SUBTHEME2 = #COLOUR
          |#default = #COLOUR FOR THE MAIN THEME
          }}

You can have as many or as few subthemes as is necessary.

For example, for Castle and it's subthemes, it would look like this:

|CASTLE = {{#switch: {{GetTheme|Theme={{{Theme}}}|Position=2}}
          |CASTLE (2007) = #959595
          |KINGDOMS = #E5E5E5
          |#default = #FFE40C
          }}

Try too add it in alphabetical order from the main colour, as this make it easier to see which themes are in place on the template.

Editing Template:TitleTextColour[edit source]

To add the title text colour, you need to add the following code to {{TitleTextColour}}:

|MAIN THEME = {{#switch: {{GetTheme|Theme={{{Theme}}}|Position=2}}
          |SUBTHEME1 = COLOUR
          |SUBTHEME2 = COLOUR
          |#default = COLOUR FOR THE MAIN THEME
          }}

The colours should be entered as either "black" or "white".

You can have as many or as few subthemes as is necessary.

For example, for Castle and it's subthemes, it would look like this:

|CASTLE = {{#switch: {{GetTheme|Theme={{{Theme}}}|Position=2}}
          |CASTLE (2007) = white
          |KINGDOMS = white
          |#default = white
          }}

Add at the bottom of {{TitleTextColour}}. Try too add it in alphabetical order from the main colour, as this makes it easier to see which themes are in place on the template.

Other things[edit source]

If your theme may be written out in different ways, you need to give all the possibilities. For example, see this entry for Harry Potter:

|HARRY POTTER 
|{{TH{{!}}HARRY POTTER}}
|HARRY POTTER (THEME){{!}}HARRY POTTER
|HARRY POTTER (THEME)= #4E448D

It will work for;

The colour does not need to be given for all of the entries, just the last one, as in the example.

Note: {{!}} has to be used in place of "|" in some cases.