Fake-Blonde Gradients
From TrillWiki
by Eh?one 22:11, 29 March 2006 (CST)
Contents |
[edit] Introduction
One of the most requested skinning features is the ability to make gradients. Well guess what kiddos, Trillian doesn't support gradients natively :( But that doesn't mean we can't fake it with a little SkinMath and a whole lot of color tags :) By dividing up the window into little strips and giving each strip a different color we can simulate the effect of a gradient.
[edit] Number of divisions
First off you should decide how many 'strips' you wish to divide your gradient into. The more strips you have the smoother your gradient will be, but the slower Trillian will redraw. For subtle gradients (for example, between two shades of light gray) 16 strips should be sufficient. Gradients with more depth will require more strips.
[edit] Using the tools at hand
GradientTool can be used to generate the numerous color tags required for this trick. Simply select your start and end colors and the number of divisions and it will spit out the code for the the gradient. You can then paste the code in the appropriate component tag.
[edit] Alpha PNG's for more spice
Once you've got your base gradient working you can really go crazy and layer png files over the gradient to complete the effect.
stev02's Luna Blue toolbar reproduced using this tip:
[edit] Getting it to work in /stixe
Although it's not recommended, it is possible to replace WindowInterior or other elements that typically span the width of the window. First you neet to replace all % symbols in your gradient code with &per;. For example, (%window.width%*1)/16 becomes (&per;window.width&per;*1)/16
Then add this to the end of your settings.ini file.
<!ENTITY per '%'> <!ENTITY % elmWindowInteriorFrame ' (your gradient code goes in here) '>
