Colors (Sep 15)

Our new estimating/accounting software still had one unfinished data entry field: a color picker. It’s only used in Cost Categories, for Estimate breakdowns. Colors make it easier to see which items belong to each project phase.

Getting the picker to work was easy: just a few lines of code. Tidying up the source code for colors took longer. Some parts are as cluttered as an attic or garage. Kinda like a 30-year time machine, showing the evolution of PCs.

Goldenseal began when most personal computers used 1-bit monitors. Back then, there simply wasn’t enough memory for more than one bit per pixel. Black & white for Macs, various pairs for MS/DOS.

As RAM increased, colors crept onto the scene. The earliest used just 3 bits: six colors plus black and white. Later, Macs upgraded to 4-bit colors: twice as many choices. There was pink! Light blue! More than just Roy G. Bv. Later, 6-bit and 8-bit became common, expanding the gamut even further.

All those were indexed colors. Each pixel chose from a palette of 8, 16, 64 or 256 shades. For anything in between, you dithered two colors in a pattern. OK when viewed from a distance, but pixelated in close view.

By the time Goldenseal shipped, nobody used less than 8-bit colors (256 choices). Our code supported five different bit depths, but ignored four of them. The system palette was too garish, so we made a custom version that was mostly light tints (for backgrounds) and dark shades (for text).  Data entry backgrounds used 24-bit true colors to get more pastels.

Twenty years later, RAM is cheap. Nearly everyone uses 32-bit colors. Rather than a palette, those have 8 bits apiece for red, green, blue and alpha (transparancy). That’s 16 million shades, good enough for most uses. It’s what we use everywhere in the new accounting app.

Apple goes deluxe, with 64-bit colors in their Cocoa framework. The extra depth is a slight improvement for high-quality photo editing, but overkill otherwise. Few users will notice the difference.

Sadly, for a few years we used Cocoa for the new accounting app. Some of our color code is still 64-bit. Switching between the two sizes sometimes causes bugs, but at least they are obvious and easy to fix. If Qt ever enhances their color setup, we’ll be ready.

For business forms and data entry screens, the old 8-bit palette was perfectly fine. Colors aren’t any better in the new system. In fact, the pickers are more complicated now. Too many choices. However, we updated to full color despite that, because it’s easier. Our staff has better things to work on than a retro popup of 256 color squares, made from scratch.

Dennis Kolva
Programming Director
TurtleSoft.com

 

Author: Dennis Kolva

Programming Director for Turtle Creek Software. Design & planning of accounting and estimating software.