The Palette
Posted: Mon Apr 26, 2021 5:57 pm
Hello, first post!
The limited colors of the old days have always been interesting to me so when I worked my way through the docs I halted on the default palette and it didn't catch my attention in a good way. Of course colors and palettes are not a fully exact science, there is always the matter of opinion and taste. I found an earlier thread on the C64 colors being off, but there are more things that I think could be improved.
What I do like about the palette is the inclusion of the whole greyscale range. And the idea to fill the remaining 224 colors with groups of 7 color gradients is a very good idea. Many of the gradients are also nice.
But then there is the critique side which I'll split to following two subjects: Commodore 64 colors, and repetition.
Commodore 64 colors
I don't know the origin of the current set of C64 colors, but it seems to be more of a palette fit for new pixel art than for representing what the C64 colors really were like. Most importantly it lacks the luma pairing of colors (where color pairs equal one grey when in greyscale, which also allows for "secret colors"). And there is the whole PAL vs. NTSC vs. NTSC thing (because Not The Same Color, you know) so people have used to something and you can't really ever get it right. In the PAL land we do have Pepto who has somewhat recently done further work into the colors and we now have a new Colodore palette. It is very good!
However there is of course the problem that the PAL isn't NTSC. And by looking shots from actual TVs the current CX16 colors don't really match with what NTSC produces. So, being a bit of a moron I've gone ahead and used Pepto's calculation model in an attempt to find some sort of a compromise. As if that kinda stuff would be agreed upon in the passionate C64 world ?
The top row is Colodore, the middle has current CX16, and the bottom row has a "compromise" where I've tried to adjust the colors to be more attractive and more NTSCish, but which still maintain valid VIC-II relationships between them, while also trying to get many colors as close to the current CX16 as I could. It is still quite a difference so I don't know if this trouble gains anything of real value, but it has been a fun challenge if nothing else!
Repetition
In the current default CX16 palette there are a lot of gradients that are very near to being clones of each other. There are some colors that are visually identical to the human eye such as the bright cyans. And there are also dark palette entries that are repeated multiple times over in the palette. These issues are sort of waste. I don't think this would be fitting for an 8-bit computer as the era was full of making the most of what little you have, so repeating colors should be avoided.
There is some repetition that can't be avoided: the C64 contains black, white, and three shades of grey which get repeated in the full 16 color greyscale gradient which is all the grey entries in the 4096 color palette. This means that out in the 256 color palette we can have we can have up to 251 unique colors if we leave C64 palette and the greyscales untouched. The current default palette repeats four gradients for each of red, orange/yellow, green 1, green 2, cyan, blue, purple, and magenta (I guess that is what you call those colors). This results to only 228 unique colors so we could have 23 colors more for our use. With a total of 28 repeated colors more than 10% of the palette is "wasted".
So what to do? Well, instead of just complaining about it I've seen the trouble to produce a 251 unique color palette. I can tell you it ain't easy, especially with the 12-bit limitation! I wanted to stay in the spirit of the current default palette which means creating automated set of gradients. So I wanted to be smarter about the generated gradients and this is what I've come up with:
NEW VERSION (v10) 2021-05-04 (gradients from 24 bits to 12 bits using CIEDE2000 perceived closest color)
ORIGINAL VERSION (v9) 2021-04-26
In the above palette the entire scope of hues are being used so there are four different hue regions used where there is only "red" in the default palette. What I also like about the gradients here is how they mostly mimic a lot of game palette gradients that I've seen over the years. I did do a quick test on some images and the palette works mostly very well on many old paletted DOS/Amiga games.
I don't know if this results into really anything, but I would like to see the default palette improved before fully locking it. At least I think the above proves improvement is possible!
Then finally: if interested over at CodeSandbox you can find the tool I've created for working with palettes. You can fork it ? It is currently coded to auto-generate the palette above, although with 24-bit range. The tool can open various palette file formats (including paletted image formats) and output them as well, like .ACT which is really just a 768 bytes binary file when holding 256 color palette. I'm not yet fully sure if the Commander X16 binary output is correct since I haven't started actually playing with the emulator more than trying out some of the existing software.