Color system

From ZCWiki
Revision as of 16:08, 25 March 2008 by L (talk | contribs) (→‎The Main Palette)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The means by which Zelda Classic colors the various graphics on the screen is complex but flexible. The "color system" consists of palettes and Color Sets ("Csets"), which along with a Combo’s particular Tile define the overall color scheme of the Combo. The Quest Designer must understand some of the fundamental relationships between these objects to design a graphically coherent quest.



A palette is the group of colors that Zelda Classic can use to render the graphics on the screen. Pallettes are edited and assigned in ZQuest. Conceptually, palettes in ZQuest are very similar to a real artist's palette. For example, if an artist decides to paint a pictre of a forest, he will prepare his palette with many shades of green and brown, since those colors are predominant in a forest. Similarly, if you decide to make a forest map in ZQuest, you will use a palette that has shades of green and brown, and then you'll tell ZQuest to use that particular palette for your forest DMap.

Each DMap you create can have its own palette, and more than one DMap can use the same palette. Palettes are slightly limited in the number of different colors you can use. However, Palettes still give you the flexibility to create many different environments in ZQuest and Zelda Classic.


The colors in a palette are grouped into subsets called Color Sets, or CSets for short. Different CSets are used to color different graphics. In some cases you can control this, and in other cases you can't. Thinking back to our forest example, the artist's palette might group browns and greens together to make painting pine trees convenient, while oranges and reds are grouped together for painting maple trees. In ZQuest this could correspond to having a single palette with a CSet that has green and brown colors in it, and another CSet that has red and orange colors in it.


The above example is a bit simplistic. The true relationship between Palettes, Csets, Combos, and Tiles is difficult to describe. Another example may help.

An automotive analogy for the relationship between palettes and Csets

Let's say you are looking for a new car. The car you want comes in several different color schemes, based on what feature package you select. If you select the "Sport" package, then you have two options:

  1. yellow exterior with black interior, or
  2. red exterior with gray interior.

If you select the Touring package, your two options are:

  1. gray exterior with black interior, or
  2. blue exterior with gray interior.

You can see that if you select the Touring Package with Option 1, you'll get a gray car with a black interior. However, if you select the Sport Package, then Option 1 will get you a yellow car with black interior.

This is kind of how palettes and Csets are related. In the car example, the Package is a Palette and the Option is a Cset. The car itself could be the Combo. So you can define the color scheme of the car by first selecting a Palette ("Sport" or "Touring") and then selecting a Cset from that Palette (Option 1 or Option 2). Note that the physical characteristics of the car never change – no matter which package or option you choose, the car still has four wheels, an automatic transmission, and power windows. Only the color scheme of the car changes when you change the package or the option (or both).

The beauty and utility of these relationships becomes apparent when you think about the dungeons in the original Legend of Zelda game. All the dungeons had the same 'look' to them – they all had similar looking walls, floor tiles, statues, and so forth. Only the color schemes were different. It's no different than the car example above. You can create a single Combo – say, one that looks like a dungeon floor tile – and by using multiple Palettes and Csets you can re-use that single Combo in every dungeon, no matter what the color scheme of the dungeon is. You only have to create a single floor tile Combo, instead of creating a Combo for every color you want to use.


CSet 2 (a row) is highlighted in the Main Palette, as is Color 1 (a column).

The ZQuest equivalent of the car example is shown here. Shown here is the Main palette for the "Classic" tileset. Regardless of the palette or tileset, each CSet in the palette is a row; they are numbered from 0 to 14. In this example palette, CSet 2 is highlighted in purple.

Each Cset has 16 colors in it. In the palette shown here, Color 1 in each CSet is highlighted, forming a column in the palette. Colors in each Cset are numbered from 0 to F (where A = 10, B = 12 ... F = 15).

Note that in this particular palette CSets 2 and 3 are the same except for Color 1. Going back to the car example, this could be analagous to having two different color options, where the interior color is always tan but the exterior color is green in one option and brown in the other. In fact, if you remember the original Legend of Zelda game, these CSets were used to draw green mountains near Link's starting point, but brown mountains near Spectacle Rock. The water and ground remained the same color (analagous to the car's tan interior staying the same), but the mountains and trees were either green or brown (analagour to the car's exterior changing). This was acheieved by drawing different parts of the map with the same palette, but in two different CSets, which varied only in one color (Color 1 in this case).

This is an important concept to remember if you edit or create tiles. If you want to maximize the use of your tiles, you need to consider how they will look in various CSets (or for more advanced quest designers, you need to consider how you lay out your CSets!).

It was noted earlier that there are some limitations on how you can use palettes. The restrictions stem from the fact that everything that is ever drawn on the screen in Zelda Classic requires a palette and a CSet, including such things as the borders in the Sub-screen and Link himself. There are other constraints as well, because despite the car example above, a Palette doesn’t really apply to a single Combo – a Palette applies to an entire Dmap.

ZQuest provides a handful of palettes you can use in your quests.

The Main Palette

The Main palette for the Classic tileset.

The Main Palette contains the colors used to draw Link, his enemies, the game’s items (heart containers, bombs, etc.), the game’s graphics (like the various borders, status icons, and so forth), and a few other random things. Generally speaking, the Csets in the Main Palette are used as shown in Table 1. Note that the descriptions given are based on the original Legend of Zelda tileset – there’s nothing stopping anyone from modifying the Main Palette to make green Octoroks and purple Heart Containers. Some new Cset concepts, which will be discussed momentarily, are introduced here.

Table 1: Csets in the Main Palette.

CSet Description Behavior
0 Used for various GUI items such as status icons. Constant
1 Used for various GUI items such as status icons. Constant
2 Used for overworld and dungeon graphics such as trees, walls, statues, etc. Palette dependent
3 Used for overworld and dungeon graphics such as trees, walls, statues, etc. Palette dependent
4 Used for overworld and dungeon graphics such as trees, walls, statues, etc. Palette dependent
5 Used for overworld and dungeon graphics such as trees, walls, statues, etc. Constant
6 Used for Link, the "Zelda" Guy and the "Merchant" Guy. Constant
7 Used for sprites, typically blue enemies such as the blue Octoroks and the blue Darknuts. Constant
8 Used for sprites and the remaining Guys. Typically used for red enemies such as the red Octoroks and the red Darknuts. Constant
9 Used for sprites whose color depends on the level. Palette dependent
10 Generally not used, but available for use by ZC to color various GUI items such as Link’s position indicator or the flashing triforce/boss indicator when Link has the compass (try Quest > Graphics > Misc Colors). Constant
11 Generally not used, but available for use by ZC to color various GUI items such as Link’s position indicator or the flashing triforce/boss indicator when Link has the compass (try Quest > Graphics > Misc Colors). Constant
12 Not used by ZC. You can do whatever you want with this Cset. Constant
13 Used for the GUI. Don't bother editing. Constant
14 Used for the GUI. Don't bother editing. Constant

The level palettes

There are multiple Level Palettes – you can define up to 255 of them. As their name indicates, Level Palettes are assigned to entire levels (a.k.a. DMaps). When you create or edit a Dmap, you select which Palette the Dmap will use. This, in turn, defines how all of your Combos will look for that particular Dmap. An example of how you could use this to your advantage would be to have a "Spring" Palette, which makes all of your tree Combos green, and an "Autumn" Palette, which makes all the same tree Combos orange and red. Remember – you're not actually changing the tree combos, but since each Dmap can have its own Palette, you can use the same tree Combos in two different Dmaps and have their colors be different. That’s really the power behind the Palette system.

Palette dependent versus constant Csets

If you attempt to edit a Level Palette, you’ll notice something odd: you probably only see four of the fifteen Csets: 2, 3, 4, and 9 . And oddly enough, those are the 4 Csets noted as being "palette dependent" in the table above.

The Level 1 palette for the Classic tileset.

Think back to the various dungeons in the original Legend of Zelda game. When considering the colors used in the dungeons, there are two noteworthy things. The first noteworthy thing has already been discussed – you can draw a single tile, like a floor tile, and reuse that tile in all the dungeons. Basically, by doing this you let the Palette and Csets figure out which color the floor tile should be based on what dungeon Link is in, similar to the Spring and Autumn tree example above.

The second noteworthy thing involves the enemies (and Link) in the dungeons. Recall that some of the enemies were always the same color, no matter what level the dungeon was. For instance, the Darknuts were always red or blue, no matter what dungeon they were in. Yet other enemies, like Gels, changed color depending on the dungeon level. And Link was always his typical “Link” color. How is that accomplished? Why doesn’t Link, for instance, "inherit" the colors of the Palette that are used for the Dungeon he’s in?

The reason is that some Csets from the Main Palette are always used for certain things, like Link. Link is always drawn using Cset 6 in the Main Palette – you can't do anything about it. The result is that no matter what dungeon he's in, Link always looks the same – that is, his colors are constant, always pulled from the Main Palette, independent of whatever Level Palette is used for a level. The same is true for certain enemies, the status icons, and so forth. However, the four special Csets, the ones noted as "palette dependent", override the Main palette. When you assign a Level Palette to a Dmap, you're essentially saying, "use the Main Palette to draw everything, except use Csets 2, 3, 4, and 9 from the Level Palette I assigned." It might be easier to imagine that when you assign a Level Palette to a Dmap, Csets 2, 3, 4, and 9 get copied from that Level Palette to the corresponding Csets in the Main Palette, and the Zelda Classic just uses that new, "merged" Main Palette.


Due to the way Zelda Classic uses Palettes and Csets, the following guidelines can be derived:

  • You really only have four Csets to work with when it comes to creating your own map graphics. Thus, to maximize your color usage, you should use different palettes for different "areas" of your quest. Typically this means a different Palette for each Dmap, but that’s not always the case. The insides of houses, for instance, may be separate Dmaps, but may all use the same Palette to keep the color scheme the same for each house.
  • In conjunction with the above note, Csets 2, 3, and 4 should be used for your custom map graphics (such as trees, water, land, etc.), since you can't change the other Csets without affecting other important Zelda Classic graphics. More advanced quest designers may choose to ignore this...
  • If you want a particular Combo to look the same in several different Dmaps, you either must repeat the same colors in the same Cset for multiple Palettes, or use Cset 5 or some other unused, constant CSet.

See Also