Although subjective, I believe I'm not the only one considering default VGA 256 color palette to be hideous and ugly.
What is the story behind this, why were these particular colors chosen?
Retrocomputing Stack Exchange is a question and answer site for vintage-computer hobbyists interested in restoring, preserving, and using the classic computer and gaming systems of yesteryear. It only takes a minute to sign up.
Sign up to join this communityAlthough subjective, I believe I'm not the only one considering default VGA 256 color palette to be hideous and ugly.
What is the story behind this, why were these particular colors chosen?
That way it doesn't look any hideous and ugly, or does it?
What is the origin of the default 256-color VGA palette?
IBM's BIOS code :))
SCNR. I guess you ask more about the reasoning for it's content and ordering, right? In that case it's about packing as much functionality as possible into a single palette.
Although subjective, I believe I'm not the only one considering default VGA 256 color palette to be hideous and ugly.
Not so sure, it's pretty clean and made to support several items:
What is the story behind this, why were these particular colors chosen?
IBM describes it on p. 4-39 of the technical reference as
This fulfils all 4 requirements:
The first 16 colours are encoded exactly as with all 16 colour modes (0Dh/0Eh/10h/12h) which in turn use the same 4 bit encoding as the colour attributes of all text modes (*1).
The next 16 deliver an even lit 4 bit black (10h) to white (1Fh) grayscale
The remaining code space is used to deliver an evenly spaced, HSV colour cylinder (*2) based on a
Those 216 (3x8x3x3) colours, together with the 16 base colours and 16 gray scale (=248) leave 8 unused definitions. By guaranteeing that the BIOS will not touch them those
8 colour definitions are guaranteed free for user applications.
Bottom Line: it's all about serving for 4 different needs in a single colour table:
while still offering
All of this only looks kind of 'weird' when looking at the table without seeing those 4 purposes and the way the full colour table is structured obeying the prime number 3 embedded thrice to please the RGB colour as well as the available code space.
Of course the usual way of displaying the palette as 16x16 entries isn't helpful either(*4):
(Picture taken from Wikipedia)
Reordering it according to the 16 + 16 + 24x3x3 + 8 structure gives a way better impression(*5):
The four different groups are now clearly visible with the middle part nicely presenting the underlying sequence of
24 hues, going from blue to blue around the circle,
each provided 9 times to offer a product in
3 level of saturation (colourfulness) and
3 level of brightness
Beside well spread covering of colour space, this 3 by 3 ordering also allows any picture made of those 24 hues can be direct desaturated and/or dimmed by a simple operation:
Having this ability allows certain styles of picture manipulation as well as animation, like fase in/out from/to black/white.
In conclusion, I would think that combining all of the above requirements into a single palette is quite an achievement.
*1 - Which in turn were selected for compatibility with the CGA/EGA 8+8 RGB-I mode.
*2 - HSV vs. RGB is maybe the most overlooked part when programmers and engineers think or talk about this (and other) palette(s). They start auf from an RGB PoV which describes a technology to create colour by adding three base colours. A quite convenient system from an engineering perspective, as it reduces the problem to 3 values of equal weight. Except, that's not like human vision (or natural colour) works.
It's also not the way picture handling and manipulation works. Tools like Photoshop or Gimp primary handle colour manipulation in HSV categories.
This also touches the issue between image creation and picture handling. Thinking in RGB is fine to do Monkey Island, but not for a photo app. The standard palette tries to please the later as well.
*3 - Please note that uncounted books were written about various colour theories during the last 2000+ years, all in their own right due the complex nature of colour creation and human perception.
RGB as technology driven format does not solve any of that, but rather add another layer of complication (due translation). Of course we can punch ahead and throw enough resources (like a 24+ bit palette) at the problem to seemingly solve. Except, it's not solved, just hidden.
Thus naturally/evenly spaced can not mean numeric equal spacing of RGB values (like 100%, 66% and 33%) as the human perception does not work linear. The selection of RGB values takes that into account by
Doing so creates complementary levels for a richer colour space than doing either linear would.
*4 - Three being a prime doesn't go well neither with a decimal nor a binary number system, or does it?
*5 - For another image see here.
The VGA default palette in the 256 colour mode (Mode 13h) first has 16 color entries from CGA (which is also same as default 16-color EGA palette and the only palette for 320x200 EGA mode)
Next 16 color entries are 16 shades of gray.
And the next 216 color entries has been already mentioned; they are sets of 24 hues, in 3 different saturation values, and in 3 different brightness values. 24 × 3 × 3 = 216.
The final 8 colour entries are black, or maybe left undefined so BIOS does not overwrite them when changing modes.
After doing some further research, about the time when VGA was being designed, real graphics workstations already had better color capabilities and HSV was a bit of a craze because it provides an intuitive color model of picking colors to draw, especially to a non-technical or artist type of person using the computer. In reality HSV is quite unuseful for any other task than colour picking, as said by even highly appreciated video engineer Charles Poynton, while specifically mentioning HSV/HSL being flawed with respect to the properties of color vision.
So my guess is, because HSV was all the craze in colour picking back then, and it is a nice feature to at least initialize the palette by default to some colors instead of filling it with black or left uninitialized, the VGA default palette simply was initialized with something somebody came up, with 24 hues in 3 brightness and in 3 saturation combos to draw pretty rainbows and show off the video capabilities compared to EGA for example.
As there is a lot of repetition at different brightness and saturation levels, a part of the palette can be stored in small array and the different brightness and saturation levels could be calculated, as on VGA ROM there is not much free space left for complex palettes after storing all the necessary code and fonts.
If I recall, it's the 16-color default palette, followed by 216 colors chosen as the combinations of 3 luminance values, 3 saturation values, and 24 hue values. Having 24 hues for all nine combinations of luminance and saturation seems wasteful, but I think the design objective was to allow pretty rainbows at any lightness/saturation combo.
People may think of VGA as ugly now, but considering what came before it, it offered much more flexibility than most previous home computer color implementations. Those often offered 8 or 16 colors maximum. When they offered more than that, RAM and memory access time was so expensive that manufacturers reduced screen resolution; 320x200 was a common limit if a computer offered many colors (above 16 and less than or equal to 256 colors total).
That said, original, pure VGA was quite restrictive. (I'm writing about 16-bit VGA, not its backward compatible modes.) Six bits per color component allows for 262,144 total colors. That is far less than healthy human eyes can see. While far in excess of the 256 colors allowed in the GIF image standard, GIF (and 8-bit PNG) has a secret advantage. An image had associated Look Up Tables (LUTs), allowing a given image to access one set of 256 colors from a full 24-bit palette With decent post-processing, a 24-bit image can usually be color-sampled to achieve an "ideal" set of colors for that image. On the other hand, even if a VGA card was advanced enough to offer an 8-bit mapping of each color component, routine software would not (and probably could not with the CPU usually being busy with other stuff than ideal color display) map the 262,144 colors to use the ideal color set from 24-bit digital-to-analog computers.
But from my perspective as someone who lived through evolving home graphics capabilities from the start, VGA was pretty darn good.
For reference, see List of 16-bit computer color palettes