[an error occurred while processing this directive]

 

Change Crayons Color and name in the Color Picker (MacOS Classic and MacOS X)

by Rick Roe, webmaster of Icons.cx

I noticed in Mac OS X DP3 that the familiar Color Picker has been reincarnated (and fully Aquafied) for Carbon apps... it even includes my favorite tool, the Crayon Picker! Unfortunately, the crayons are different than the ones I use all the time under Mac OS 8/9.

Luckily, it's possible to edit the color table used by Crayon Picker under both OS versions. here's how:

Under Mac OS 8/9, the Color Picker is an Extension in the System Folder. Under Mac OS X, each picker is a separate file in the Carbon framework. The Crayon Picker is in /System/Library/Frameworks/Carbon.framework/
Resources/CrayonPicker.qtx
. Open a copy of whichever you're using in ResEdit or your favorite resource editor.


In Mac OS 8/9, the color table is stored in pltt resource id -5752; in OS X, it's a clut resource with the same id.

When you open the pltt resource, you'll get a warning that black and white should always be at the first two positions in a pltt. You can safely disregard this and go on to edit the color table.


Be sure to keep the number of colors the same as in the original color table: 60 for Mac OS 8/9, 40 for Mac OS X. Otherwise, you're free to change and reorder the colors.

I recommend using Resorcerer to edit the pltt/clut; its color table editor is much more robust and even allows you to use the Color Picker. (You're working on a copy, right?)


Now that you've added your favorite crayon colors to the picker, maybe you should put in their names, too. The names are kept in a STR# resource: id -5750 for OS 8/9, id -5751 for OS X. They're in the same order in the STR# resource as they are in the color table.

Make sure you have the same number of strings as there are entries in the color table.


Save your work and replace the original Color Picker or CrayonPicker.qtx file with the one you edited.

In Mac OS 8/9, you'll have to restart to see any changes. Once you do, a quick way to get at the Color Picker is in Finder Preferences, under the Labels tab. Here's a sample; notice the fifth color in take top row:

Under Mac OS X, you can see your changes without rebooting. Invoke the Color Picker through any Carbon app (I recommend the text attributes palette in /System/Demos/Champolloin.app) and you should be able to see it; you might need to quit and reopen the application if it was open when you performed the edit. Here it is, with white (in the lower left) changed to bright cyan:

A better way to implement the hack under OS X would be to copy Carbon.framework in its entirety to your user frameworks directory (~/Library/Frameworks) and edit the CrayonPicker.qtx file within the copy. If you want to make the changes apply to every user, put the copy in /Local/Library/Frameworks. That way the /System hierarchy remains the way it was when you installed OS X, and reverting is easy.



Support ResExcellence By Visiting Our Sponsors!
Support ResExcellence By Visiting Our Sponsors!

[an error occurred while processing this directive]
Maintained by the Staff of ResExcellence. This entire site ©1997-2003 ResExcellence
Privacy Statement? Sure we gotta Privacy Statement.

[an error occurred while processing this directive]
[an error occurred while processing this directive]