Scheme to Theme Converter

Many years ago, there was a cool shareware application called Kaleidoscope that changed the look and feel of the Mac OS user interface. Kaleidoscope users had the ability to select "scheme" files that would change their system from ordinary to silly, industrial, or artistic. It was quite an innovative piece of software.

When Mac OS 8.2 was being developed, Apple made their own "theme" system that worked in a similar way. Users would select a theme file and the entire user interface would change to a whole different look. During this time, somebody at Apple went so far as to create a scheme-to-theme converter and demonstrated it during some Macworld Expo or something. The developers of Kaleidoscope were furious to say the least. Mac OS 8.2 was not ever released. Instead, development continued into Mac OS 8.5 as Steve Jobs made his famous return to Apple. Well, Steve didn't like themes, he wanted a consistent interface on Macs, so he canceled the theme project and unleashed Aqua several years later as part of Mac OS X.

A little-known fact is that Apple was almost finished with the theme engine so they left it in Mac OS 8.5 when it was released, and the themes included with the 8.5 public beta still worked in the release. In fact, they continued to work all the way until Mac OS 9.2.2!

Any-hoo, Apple never released their scheme to theme converter. So I thought, let's finally make one. Or at least a little bit of one, just to pay tribute to this strange time when Steve axed all of the bitmaps and beige computers in favor of the iMac and the Aqua interface.

Original Stored 'cicn' format image

Colored areas that are actually used in the scheme

Schemes and Themes accomplish a very similar effect on the Macintosh, but they go about it in very different ways. The image resources stored in schemes are very different than those stored in themes. Both contain raw indexed data, though, so parsing and re-formatting image data results in a lossless conversion. The images above show how Kaleidoscope's document and alert window images are all stuffed into one image. Colored portions designate individual pieces.

This converter currently reads the source image and splits it into all of the separate little images that themes need, and stores them into a theme. So far, the converter converts all types of window frames, but it does not convert any other elements, such as controls, background colors, or most text colors.

I am constraining this project to parsing only Apple-specific image resource types contained in schemes. For example, 'cicn', 'ics8', 'ics#', 'ppat', 'clut', etc.

Here are several schemes converted to themes:

More progress! The converter handles 'cinf' --> 'layo' conversion now, which includes pulling text colors and inserting into the 'clr#' resource. Push buttons, bevel buttons, and background colors from Onyx are demonstrated in this picture:

I am just beginning to parse out wnd# resources. wnd# is responsible for laying out custom window frames. Themes use layo resources for this purpose, just like controls.

Follow my progress here: Forum

The source code has no license and is quite hackish. There's plenty of coupling going on and not near enough comments. Please don't judge me for it, I like to think that I write much nicer code than this for important things! It is written in C++ and likes to be built in Mac OS X using Xcode. The code is provided with no warranties whatsoever and it may very well blow a hole right through your CPU for all I know. Use at your own risk and only as a curiosity.

Download Source Code: