[Android Themes] hoppermi:
There are alot of great resources here to get started theming, so I won't go into the basics here. This thread is a how-to structure a .ctz theme for Chameleon OS, a new ROM that uses a theme engine similar to MIUI. Theming for ChaOS is easy compared to the theme chooser, no xml mapping or any of that. It is very straight-forward.

So I will do my best not to overcomplicate it.:D

Someone is usually available for support on IRC Freenode #chameleonos

Theme structure

The Chameleon OS theme is made up of 3 components

1. Individual app or icon archives containing a res folder and a theme_values.xml

2. A description.xml that contains the basic info like theme name and author

3. Folders for Media

Archives

The Chameleon OS theme archives are for individual apps and an icon archive. They are labeled by app, for example, com.android.systemui, framework-res, com.android.settings, and so on.

The app archives contain a res folder and a theme_values.xml(if you are changing any values). The res folder will have subfolders for each resolution you are theming,i.e., drawable-hdpi, drawable-xhdpi, drawable-mdpi, drawable-nodpi and so on, your decompiled apk will show you what images go in which folder.

In addition: you can override framework images on a per-app basis. Simply include the framework images you want to override in the appropriate drawable-folder. This comes in handy for fixing text/background issues in individual apps, without having to re-theme the app. Simply add the backgrounds(or whatever) you want to change to the proper drawable folder and *BAM* its fixed. You have this option with theme-values also. Another way this comes in handy is because of the theme mixing feature, certain drawables are taken from framework for each app. Example: when someone mixes a dark status bar with a light framework, the proper notification backgrounds will show if you include them with the systemui archive.

The icons archive just contains the res folder and drawable subfolders containing the icons you are using with your theme.

Description xml

The description.xml is a xml file containing basic info that the Theme Manager uses. Here is an example:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<ChaOS-Theme><title>*</title><themer>*</themer><author>*</author><version>*</version><uiVersion>2</uiVersion></ChaOS-Theme>

Where you see * is where you enter the info for your theme, title, themer, author, version

Other folders for media(previews, ringtones, wallpaper, boot animation)

previews folder - contains screenshots that show up in the theme manager. Images are labeled as follows: preview_0.png, preview_1.png, ect. Also, you can specify an image for each category: preview_launcher_0.png, preview_statusbar_0.png, preview_contact_0.png, preview_icons_0.png, preview_mms_0.png.

You can have as many images as you want, just change the number at the end from 0 to 1,2,3, etc.

wallpaper folder - contains your default wallpaper labeled default_wallpaper.jpg or .png

ringtones folder - you can include a ringtone and a notification tone that can be applied with theme manager they should be mp3 format and are labeled as follows: notification.mp3, ringtone.mp3

boots folder - contains the bootanimation.zip you want to use with your theme

Theme_values

The Chameleon OS theme engine allows for the changing of many of the things found in the values folder of your decompiled apk: arrays, attrs, bools, colors, dimens, and strings.

Mostly themers just use colors to fix text readability issues, but all are available for your themes. In addition, the theme engine allows you to override framework values on a per-app basis. this allows you to correct text issues within a single apk, without impacting other apks that use the same value.

Example: Say I wanted to change the color value holo_blue_light to an orange color, in an apk.

File name - theme_values.xml

<?xml version="1.0" encoding="utf-8" ?>
<ChaOS_Theme_Values>
<color name="holo_blue_light">#ffff8800</color>
</ChaOS_Theme_Values>

You can include as many values as you like in between the <ChaOS_Theme_Values> and </ChaOS_Theme_Values>

This file goes with the res folder for your apk when making the archive.

Archiving the theme

This is important if you want your theme to work. I am using windows and winrar(zip format not rar) to archive. If you are on Mac or linux it may differ slightly

Select the res folder and theme_values.xml together, right-click->Add to archive. Name the archive appropriately, i.e. com.android.systemui

Repeat for each apk that you are theming.

Put all of your archives with the media folders and the description.xml and select all, right-click->Add to archive

Name your archive themename.ctz

Push to your device and apply then go back and do it 50 more times until it looks the way you want :p