CSS style RGB manipulation in skin
#1
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
Reply
#2
You can use colordiffuse. It's not optimal because the possible colors depend on color of your texture but at least it works.
Image
Reply
#3
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?
Reply
#4
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>
Reply
#5
Sranshaft... strangely both those examples work in Frodo... Wrong. I was using nightly builds. Nothing to see here.
Reply

Logout Mark Read Team Forum Stats Members Help
CSS style RGB manipulation in skin0