Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:42 19 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Test Program for New Named Colors

Author Message
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 405
Posted: 09:58am 15 Jul 2021
Copy link to clipboard 
Print this post

In firmware 5.07 we have 8 additional color names that can be used with the rgb() function, for a total of 16 colors. I was curious about the new colors: what they looked like and why those particular ones were chosen.

After looking at the colors on all 4 color depths (8, 12, 16, and 32 bits), I realized that the new colors were cleverly chosen so as to look as similar as possible regardless of what bit depth is chosen!

The 8 "primary" colors (red, yellow, green, cyan, blue, magenta, black, white) that can be created with every possible combination of 0 and 255 for each of the r,g,b components look identical on every bit depth. But the additional 8 colors cannot be made to look exactly the same on every bit depth, particularly on 8-bit color, due to the limited number of bits per color component. As anyone who tried to make a gray scale on 8-bit color has discovered, there are only 4 usable gray values: the others are a nasty greenish shade. This is because the blue component has only 2 bits, whereas red and green have 3.

But the new 8 colors (brown, orange, pink, gold, salmon, beige, lightgray, and gray) look very similar on all bit depths.

I wrote the attached little test program to look at all the named colors in all possible bit depths. If you have a Gen 2 system, this includes 32-bit color.

-Bill





NewColorsTest.zip
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025