CFS1 panel palette

hubbabubba

Charter Member
Hello everyone!:wavey:


Recently, through email conversation, Ivan was asking me if there was a standard for the panel palette. I decided to answer using this forum as I think that the information could be useful to others.


The short answer is; "No, no standard palette".


But CFS1 palettes do share some common similarities worth knowing.


All stock aircraft panel.cfg have this section;
[8 Bit Colors]
PALETTE=PALETTE.BMP


This relates to a palette.BMP to be found in all panel sub-folder. It is simply a 1x1 pixel bitmap containing 256 colors in its palette, the same colors in the same order that you will find in the other bitmaps; Panel_Background_1024.BMP, Panel_Background_640.BMP, and Thrust_Lever_Background.BMP. This was, incidentally, a marked departure from the way FS98 was treating palette, simply enunciating in panel.cfg a list of colors, 32 or 33, like here for the Sopwith Camel;
[8 Bit Colors]


color00=173, 107, 33
color02=181, 123, 41
color01=189, 132, 49
color03=206, 156, 74
color04=206, 148, 57
color05=190, 140, 49
color06=189, 132, 41
color07=222, 173, 74
color08=106, 90, 49
color09= 98, 82, 65
color10= 90, 74, 49
color11= 82, 57, 24
color12= 74, 57, 24
color13= 65, 49, 24
color14= 65, 41, 16
color15= 57, 32, 8
color16= 49, 32, 8
color17= 49, 24, 0
color18= 41, 24, 0
color19= 74, 74, 65
color20=239, 189, 180
color21=230, 205, 213
color21=230, 197, 180
color22=156, 123, 106
color23=255, 246, 230
color24=246, 222, 164
color25=222, 189, 106
color26=172, 131, 65
color27=139, 98, 49
color28=106, 74, 24
color29=131, 82, 32
color30=123, 74, 32
color31= 82, 41, 16


depending on the panel, with their Red-Green-Blue (RGB) values. Put simply, the palette.BMP is the list. Each of them, and their associated bitmaps, do follow some common rules, but are unique to one panel.


The colors are indexed from light to dark. Most have R=255-G=255-B=255 (pure white) at index 0 and R=0-G=0-B=0 (pure black) at index 255. Pure black is in all palette.BMP but not pure white; both Spitfires have R=250-G=250-B=246 at index 0.


Within these palettes, you will always find these "reserved" colors;
-255,0,0 (pure bright red);
-128,0,0 (pure dark red);
-0,255,0 (pure bright green);
-0,128,0 (pure dark green);
-0,0,255 (pure bright blue);
-0,0,128 (pure dark blue).



They do not follow the indexing pattern (light to dark) of the rest of the palette.


These reserved colors must be preserved if you want your HUD to change color when you hit Shift-W keys. And yes, Spitfires' white is not pure white. If you don't reserve these colors in your palette, it may lead to weird rendering, beware! Note that snall changes (like 0,130,0) may go unnoticed, but departure from the reserved colors is at your own risk.


You will also note that most of the palette is rather dark. This is a by-product of the reduction of the original full-colors (24-32 Bit) to a 256 colors (8 Bit) choice. If you need more colorful colors. like yellows or magentas, you must "implant" them early in your 256 palette, otherwise you have, like me with the He 162 panel, to content yourself with what you have. The best way to do that, for reserved and special colors, is to use duplicates or quasi-duplicates and replace the pixels "stolen" by the other close match, usually nearby in the index. Lightening the palette is never a good solution, especially if you don't want weird colors appearing at dusk-night-dawn. The sun glare effect is not dependent on the palette but on a masking bitmap (sun.BMP) superimposed.


You should also use index 255 always as pure black (R=0-G=0-B=0) and use it for the transparency of your cockpits and only for that. Dark colors near the end of the index will make perfect substitutes for the "solid" parts affected.


In fact, despite the limitations of a mere 256 colors, chances are that you have many duplicates. For example, the palettes of the stock aircraft Panel_Background_1024.BMP have only;
226 (Bf 109e);
216 (Bf 109g);
221 (Fw 190a);
190 (Hurricane I);
207 (P47D);
219 (P51D); and,
212 (Spitfire MkI and IX),
uniques colors in them. leaving 30+ to "mess with".


Finally, you must realize that this palette.BMP does not only govern the panel rendering and the HUD rendering, it also controls the rendering of the bitmaps inside your gauges. So a nice looking gauge in panel A may look crummy in panel B, as you are at the mercy of the rendering engine of CFS1.


I hope that this will help Ivan and others interested by panel making for CFS1.
 
Back
Top