Message-ID: From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Re: Allegro palette construction Date: Tue, 17 Feb 1998 10:17:19 -0000 MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk John Kissell writes: > New to DJGPP and Allegro, I've allways relied on commercial > compilers' predefined color #defines for a given screen mode. Is there a > FAQ or URL where I could learn more about how to go about constructing > color palettes in Allegro? Which values represent cyan or light red in > 640 x 480, 16 bit VGA, or dark blue in 24 bit true color, for example? It isn't totally clear whether you are using a 256 color or a truecolor resolution, and the method for specifying colors is totally different depending on this. In a 256 color mode, the appearance of each color value depends entirely on how you have set up your palette, so you can map each number to whatever color you like. Usually people will read their palette data from an image file or a datafile object, but you can also construct one within your code. This is demonstrated in several of the example programs: I don't have the files here to check exactly which one, but I think it is ex3 or ex4. In a truecolor mode, there are again no fixed values because the color layout can vary from one graphics card to another. You should use the makecol() function to construct colors in the appropriate format for the current video mode. Shawn Hargreaves.