Kodi Community Forum

Full Version: CSS style RGB manipulation in skin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Is it possible to draw things in a skin and set an RGB attribute? I can't see any reference to such a thing but thought I'd ask anyway.

Context: For a weather addon I want to draw a rectangle and put the temperature in the middle. I could create a truck load of icons and put them in a media folder, but it would be cooler if I could just shade a single icon the colour of my choosing.

Paul
You can use colordiffuse. It's not optimal because the possible colors depend on color of your texture but at least it works.
Interesting thanks. An all white texture (or b/w texture) should dodge the problem you describe.

However I note:

http://wiki.xbmc.org/?title=Texture_Attributes

says "(Future Gotham addition)"

so it's not in Frodo? Or that page is out of date?
It is in Frodo but <colordiffuse> effects the whole control whereas in Gotham <colordiffuse> can be applied separately to individual textures. This comes in handy where a control has multiple textures associated with it; ie. the radiobutton, slider, etc.

Example in Frodo:

Code:
<texture>foobar.png</texture>
<colordiffuse>XXRRGGBB</colordiffuse>

Example in Gotham:

Code:
<texture colordiffuse="XXRRGGBB">foobar.png</texture>
Sranshaft... strangely both those examples work in Frodo... Wrong. I was using nightly builds. Nothing to see here.