Our staff uses the Qt framework to build the new accounting software. It creates apps for both Mac and Windows. If there’s enough demand, we could even release something for Linux.
Every month or two, Qt gets an update. Usually they don’t affect our code, but the latest one broke the Windows GUI. All colored backgrounds suddenly went white.
A while back I ranted about past hassles with text on computers. Colors have a similar rocky history. This is not the first time they’ve caused problems.
Our first estimating software (MacNail) ran on the Mac Plus, with simple one-bit black & white pixels. Monochrome was the rule back in those days.
Soon, the Mac II came along with an 8-bit graphics card (enough for 256 colors). In order to actually see more than B&W, we had to jump from the standard one meg of RAM to 4MB (an extra $4000, inside an already expensive machine).
Because memory was so precious, apps and hardware often used a smaller range of colors: usually 8, 16, 32 or 64 of them. Goldenseal still contains ancient code to deal with black & white and the many possible color gamuts.
256 colors was enough for many tasks, but it was too sparse for photos. The best you could do was a custom set of colors to match the contents, then dither with dot patterns to get anything in between. Not great, not terrible.
As computers matured, RAM grew cheaper and colors improved. First it was 16-bits (65,000 choices): fine for almost everything, but photos still needed to be dithered. The specs used 5 bits apiece for red and blue, and 6 bits for green. Human eyes are more sensitive in the middle of the spectrum.
Then came 32-bit full color, with one byte apiece for red, green and blue. It allows for 16 million hues, good enough for all but the fanciest photo editing (humans can only distinguish a couple million colors). The left-over byte was soon used for transparency (called the alpha channel).
Life would be easier for programmers if everyone standardized on one color system, similar to UTF-8 for text. Sadly, that is not what happened. Web standard is 32 bit RGBA, but Apple uses decimal numbers instead. Qt stores 2 bytes apiece (64-bit colors). The spectrum also may come in CMYK (cyan/magenta/yellow/black) or HSV (hue/saturation/value), plus the usual RGB and RGBA. They all get to the same places, but with different numbers and different math.
The current Goldenseal uses a palette of 256 colors for lines, text, and field background colors. We set up a custom color palette with extra pastels (for backgrounds) and dark shades (for borders and text). Still plenty of bright colors in between.
We would have kept the same setup for the new accounting software, but 32-bit colors are easier to program. We actually store 64-bits for them, just to be compatible with Qt. Memory is cheap, and maybe it will help for a future RobotOS which adds X-ray vision.
Meanwhile, alpha channels are still evolving (it’s what broke our Windows version). Opacity doesn’t have much impact on accounting software, but we did find a few places to use it. You might like having alphas if you print forms in color?
Color pickers only set RGB colors, so the new Custom Layouts puts transparency into a separate dialog. Right now, it gives weird decimals as we convert between percents and integers. 100 doesn’t divide into 256 very well.
Dennis Kolva
Programming Director
TurtleSoft.com