iaian7 » code » dashboard   John Einselen, 13.09.09 (updated 22.05.13)    

Chroma is an OS X Dashboard utility for converting colours between HSV, RGB, and HEX formats. Favourites can be saved to the swatch library, and traded between computers using clipboard import/export options.

IMPORTANT: Version 4.0 includes an all new library system, support for multiple types of data (256 integer, percentage, and floating point values), updated copy/paste, and many other updates.

To transition your old library, navigate to the location you saved it originally and copy the contents of the text file to your system clipboard. In the Chroma widget settings (click the “i” icon in the upper right hand corner), select “import” and choose how you want to treat the incoming data. Values will be automatically converted into the new floating point format and saved in the internal library. Data can be exported and traded between computers using the same method.

Colour data can be added a number of ways, from pasting from the clipboard (such as when copying HEX values out of Photoshop), entering numbers manually, or using the arrow keys to increase or decrease a value (hint: hold down the shift key for larger multiples!).

All inputs are updated live, and will convert between HSV, RGB, and HEX colour values automatically. Click the format title to copy the values to the clipboard. If you wish to store a sample in the library, simply click the plus button on the swatch and enter a group name and swatch name.

Library swatches can be sent back to the main editing area by clicking on the arrow over the colour sample, or deleted by clicking on the minus sign on the far right hand side. Clicking on any value in a library swatch copies the data to your system clipboard.

Editing a library entry is easily done by moving the data to the editing area (click the colour sample in the library to load it), and tapping the delete icon to remove the old swatch. Once you’re done changing values, click the plus sign (the large colour swatch), and the correct group and swatch name will already be filled in. Click save to enter it back into the library.


1chroma.zip version 4.2.2

By clicking the download link, you signify your acceptance of the following agreement. This application is freeware, to be used and abused however you like. However, the author(s) assume absolutely no liability, and the software is offered with no warranty or quality assurance. And God forbid you use it in the operation of nuclear facilities (a warning I see in the EULA of so many applications, I really do wonder how exactly someone could use a graphics utility in the operation of a power plant). In short, use at your own risk.

Known Issues

Libraries larger than 30 entries may slow down on some computers when adding or removing entries, depending on computer performance. While I fully agree this isn’t a particularly large collection of colour swatches, in testing so far it still appears to be more stable than the old file based system. You can read more about that below.

Version History

4.2.2 — fixes naming error that prevented text entry
4.2.1b — switches to system-wide library instead of per-widget, hopefully preventing data loss when removing or updating widgets
4.2 — fixes critical library save error
4.1 — bug fixes, library import/export, version testing, and more
4.0 — major update, new library format, adds support for extended formats, clipboard additions
3.1.1 — fixed preference saving on hide
3.1 — user interface improvements
3.0 — all-new UI design and icon
2.1 — saves scroll position when adding, removing, and reloading library swatches
2.0 — adds group titles and swatch display options, various UI updates
1.9.9 — adds group and name validation (must contain letters)
1.9.7 — fixes broken HSV/RGB/HEX translation and updates arrow key behavior
1.9.5 — adds failsafe for 4096 byte truncation and improved error catching
1.9 — fixes long library truncation
1.8 — revises library format to list group and name first
1.7.5 — fixes errors encountered with non-standard library entries
1.7 — adds expandable library area and better directory/file support
1.6.5 — removes HEX hashtag from stored values and copy/paste
1.6 — fixes errors with selecting existing libraries
1.5.5 — fixes HEX output (2-digit pairs), button visibility, and default location
1.5 — fixes empty library errors, display issues, and clarifies first install
1.4 — updates images, add, remove, and other library management functions
1.3 — adds library functions (major release update)
1.2 — improves event handling and input processing
1.1 — implements conversion code and formatting
1.0 — initial release

Older library support

Versions prior to 4.0 used a plain-text library format, with its own set of strengths and weaknesses.

When first starting up, Chroma will alert the absence of a library file and ask you to specify a library location in the preferences panel. The default is set up to use ~/Library/Preferences/, but you can just as easily use ~/Dropbox/ for cross-computer syncing via Dropbox (if you don’t have an account, you can get 2Gb free by visiting getdropbox.com). This location input can point to any valid folder structure, including ones managed by SugarSync, LiveMesh, or other services.

Because the library collection is stored in a plain text file, manual editing is also possible. If the library file is deleted, it will automatically regenerate using the original demo colour samples. It’s recommended to keep the library backed up elsewhere to prevent accidental deletion of any important swatches.

Unfortunately, depending on the mac, the Dashboard command line access occasionally truncates returned data to 4096 bytes. Chroma 1.9 introduced extended input capabilities to support larger library collections, and version 1.9.5 implements a failsafe to prevent library corruption in case the extended input is unable to get the full contents of a file. If your system erroneously reports a 4096 byte file, Chroma will automatically warn you of the error, and request to reload the library.

While the updated library system used in 4.0 versions and later may not be as easy to sync across computers, the data format is similar, and you can always import your old library data into newer versions of the widget. If you wish to continue using 3.1.1, feel free to download the older version, or build your own from the source on GitHub.


Support is not technically available – it is free after all – but you can send bug reports, suggestions and questions via the contact form  (if you don’t mind my slow-or-never responses, depending on the workload at my day job!).