Colour themes: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Theuni
No edit summary
No edit summary
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
The xml files contained in the colors/ folder contain the different colour themes for the skin. This allows you the skinner to define the colours that you'll use for text + images once in terms of english names (rather than hex codes) and potentially allows you to have different colour themes.
The XML files contained in the colors/ folder contain the different colour themes for the skin. This allows you the skinner to define the colours that you'll use for text and images once in terms of English names (rather than hex codes) and potentially allows you to have different colour themes.


Each colour theme has a single .xml file. The default colours should be placed in default.xml - this is a fallback file that is used when the user hasn't requested another colour theme, or when their selected colour theme doesn't contain a particular colour assignment.
Each additional colour theme has a single XML file, where the filename should be the same as the name of the colour theme (e.g. orange.xml). The default colours should be placed in defaults.xml - this is a fallback file that is used when the user hasn't requested another colour theme, or when their selected colour theme doesn't contain a particular colour assignment.


The layout is as follows (note that the hex code is in ARGB format):
The layout is as follows (note that the hex code is in ARGB format):


<source lang="xml">
<syntaxhighlight lang="xml" enclose="div">
<colors>
<colors>
   <color name="white">ffffffff</color>
   <color name="white">ffffffff</color>
Line 11: Line 11:
   <color name="green">ff00ff7f</color>
   <color name="green">ff00ff7f</color>
</colors>
</colors>
</source>
</syntaxhighlight>


You can then use <textcolor>white</textcolor> within the main skin files to refer to which colour you want. This allows you to easily change all the colouring in the skin by just adding a new .xml file to the colors/ folder.
You can then use <textcolor>white</textcolor> within the main skin files to refer to which colour you want. This allows you to easily change all the colouring in the skin by just adding a new XML file to the colors/ folder.
[[category:Skin Development]]
 
== See also ==
'''Development:'''
* [[Add-on development]]
* [[Skinning]]
 
[[Category:Skin development]]

Latest revision as of 18:38, 7 September 2015

The XML files contained in the colors/ folder contain the different colour themes for the skin. This allows you the skinner to define the colours that you'll use for text and images once in terms of English names (rather than hex codes) and potentially allows you to have different colour themes.

Each additional colour theme has a single XML file, where the filename should be the same as the name of the colour theme (e.g. orange.xml). The default colours should be placed in defaults.xml - this is a fallback file that is used when the user hasn't requested another colour theme, or when their selected colour theme doesn't contain a particular colour assignment.

The layout is as follows (note that the hex code is in ARGB format):

<colors>
  <color name="white">ffffffff</color>
  <color name="grey">7fffffff</color>
  <color name="green">ff00ff7f</color>
</colors>

You can then use <textcolor>white</textcolor> within the main skin files to refer to which colour you want. This allows you to easily change all the colouring in the skin by just adding a new XML file to the colors/ folder.

See also

Development: