Chanching Textcolor according to Theme
#1
Hello

i would like to change the text Color According to a Theme

what i Try ist this (defaults.xml) :
PHP Code:
<colors>
<
visile>Skin.HasTheme(dark)</visible>
    <
color name="white">FFFFFFFF</color>
    <
color name="grey">FFb4b4b4</color>
    <
color name="grey2">FF999999</color>
    <
color name="grey3">FF505050</color>
    <
color name="black">FF000000</color>
    <
color name="blue">FF0084ff</color>
    <
color name="selected">FFEB9E17</color>
    <
color name="invalid">FFFF0000</color>
</
colors>


<
colors>
<
visile>!Skin.HasTheme(dark)</visible>
    <
color name="white">FFFFFFFF</color>
    <
color name="grey">FFb4b4b4</color>
    <
color name="grey2">FF999999</color>
    <
color name="grey3">FF505050</color>
    <
color name="black">FF000000</color>
    <
color name="blue">FF0084ff</color>
    <
color name="selected">FFEB9E17</color>
    <
color name="invalid">FFFF0000</color>
</
colors

but sadly this doesn't work (also if i wrap both with controls)

ist there an other way that i miss?

Thanks in advance
Reply
#2
that's not the way it's supposed to be done ;-)

for each color theme, create a new .xml file, where the filename is the name of the theme.

defaults.xml
PHP Code:
<colors>
    <
color name="white">FFFFFFFF</color>
    <
color name="grey">FFb4b4b4</color>
    <
color name="grey2">FF999999</color>
    <
color name="grey3">FF505050</color>
    <
color name="black">FF000000</color>
    <
color name="blue">FF0084ff</color>
    <
color name="selected">FFEB9E17</color>
    <
color name="invalid">FFFF0000</color>
</
colors

dark.xml
PHP Code:
<colors>
    <
color name="white">FFFFFFFF</color>
    <
color name="grey">FFb4b4b4</color>
    <
color name="grey2">FF999999</color>
    <
color name="grey3">FF505050</color>
    <
color name="black">FF000000</color>
    <
color name="blue">FF0084ff</color>
    <
color name="selected">FFEB9E17</color>
    <
color name="invalid">FFFF0000</color>
</
colors
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
To understand this correctly

if i've got a "default.xbt" (dark) and a "bright.xbt (bright) with all Images in there, all i've got to do is naming the xml's in the "color" folder according to the name of the Theme (bright.xbt) and they chanche automatically?
Reply
#4
(2013-10-27, 16:00)Rantanplan-1 Wrote: To understand this correctly

if i've got a "default.xbt" (dark) and a "bright.xbt (bright) with all Images in there, all i've got to do is naming the xml's in the "color" folder according to the name of the Theme (bright.xbt) and they chanche automatically?

yup.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
though the default texture file should be called Textures.xbt

so:

Textures.xbt > defaults.xml
bright.xbt > bright.xml
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#6
Cool!!

will try this.

Thanx
Reply

Logout Mark Read Team Forum Stats Members Help
Chanching Textcolor according to Theme0