FrisbeeMonkey Logo
Home   Winamp3   Outdoors   Photos   blank
 


 
{ Main }{ Tutorial }{ References }{ Skins }
 
UpperLeft blank Intermediate - Gammagroups UpperRight
 

Creating Gammagroups

Now that we've added the Visualizer to our shade Layout, most of our main window is done. While it looks cool in a metallic sort of way, it really isn't too colorful though is it? In this section, we'll explore the wonderful world of color themes.

The first step to making any color themes is to make gammagroups. While quite easy, this step does take a little strategy and forethought. You should only group things that you always want to be of similar color. For example, usually you want all of your Control Buttons to be the same color so you put them all in the same group, but you want them to be a different color than your background so you put that in a separate group.

To add an element to a gammagroup, you merely have to add this Parameter:

gammagroup="background"

This of course would add that element to the "background" gammagroup. You can name your gammagroups whatever you'd like, but it is a good idea to make them something meaningful so that in later steps you know what they encompass. Instead of us dredging through each line of player-elements.xml, discussing each entry and why it is in that particular gammagroup, you can get the updated file here. It has been renamed as "player-elements.txt" so that your browser doesn't try and open it as XML. Take a look at it, get a feel for what each gammagroup covers.

Creating Gammasets

With our gammagroups assigned, we can now create our gammasets. Each gammaset is a color theme. In it, you define the red, green, and blue values for each of your gammagroups. Unlike in earlier steps, with things like the Vis or Texts, it is not just a simple scale from 0 to 255. Unless otherwise specified, a gammagroup's values will be "0,0,0" signifying no change. To allow for the groups to achieve the largest range of colors, the new scale is -4096 to 4096. Winamp takes these values and adds or subtracts the corresponding amounts of red, green, and blue.

To utilize color themes, we need to create a new file called "gamma-presets.xml". This is where we will define our gammasets. As always, the new file must also be included so that Winamp will load it. So that all parts of your skin are affected, it should always be the first file included in "skin.xml". To start us off, let's look at a color theme contributed by Gonzotek to see how it works, then copy it into our new file and see what it looks like.

<gammaset id="Blue Goo, Yellow Highlights - Gonzotek">
   <gammagroup id="background" value="-500,-500,1500" boost="0" gray="1"/>
   <gammagroup id="inset" value="1500,1500,-500" boost="0" gray="1"/>
   <gammagroup id="display" value="-500,-500,1500" boost="0" gray="0"/>
   <gammagroup id="displaydetail" value="0,0,0" boost="0" gray="0"/>
   <gammagroup id="slider" value="1500,1500,-500" boost="1" gray="1"/>
   <gammagroup id="displaylabel" value="1500,1500,-500" boost="0" gray="1"/>
   <gammagroup id="togglebutton" value="1500,1500,-500" boost="0" gray="1"/>
   <gammagroup id="speaker" value="-2000,-2000,1000" boost="0" gray="0"/>
   <gammagroup id="cbutton" value="-500,-500,1500" boost="0" gray="0"/>
   <gammagroup id="cbuttonlabel" value="1500,1500,-500" boost="0" gray="0"/>
   <gammagroup id="winlabel" value="0,0,1500" boost="0" gray="1"/>
   <gammagroup id="Thinger icons" value="-500,-500,1500" boost="0" gray="1"/>
</gammaset>

As you can see, each gammagroup is represented here, including one we didn't define, namely "Thinger icons", which is an internal gammagroup whose function should be obvious. Notice that the background subtracts red and green, yet adds blue. This will result in the once silver background having a blue hue to it now. On the other hand, the displaydetail leaves everything unchanged, which in this case is white.

There are also two other previously unseen Parameters, boost and gray. When set to "1", boost brightens up the gammagroup by adding 50% more white to it. The more useful of the two, gray, is helpful when a skin isn't graytones to start. When set to "1", the gammagroup elements will be treated as having a light gray base. When set to "2", the gammagroup elements will be treated as having a dark gray base. For this skin, the Parameter doesn't do very much since the skin was initially shades fo gray.

Now that we understand the parts of a gammaset, we should try one out to see what it does. If you haven't already, copy Gonzotek's gammaset into "gamma-presets.xml", and save the file. Then refresh the skin and you should see something like this:

Blue Goo Color Theme by Gonzotek

Looks a lot different than the default colors, huh? Speaking of which, with only one color theme, this is what the skin is always going to look like. It is generally a good idea to create a default gammaset as your first gammaset. For this skin, you can just create the gammaset and set everything to zeroes since this skin looks decent in all gray. Whatever you put in the "id" will show up under the Color Themes List in the Preferences window, so for this one put "Default".

While "Blue Goo" is a decent theme, it doesn't fit every occasion so let's make more. Manually changing the numbers and refreshing the skin to see if it looks right, however, can get really tedious, really fast. Luckily, in the next section we're going to look at the GammaWorker program to make this task a lot easier.


 
BottomLeft blank < Previous Up One Level Next > blank BottomRight


FrisbeeMonkey Logo Foot
Sign Guestbook     Email