From: "Michael Stewart" Newsgroups: comp.os.msdos.djgpp Subject: Re: colour palettes in mode13h Date: Mon, 25 Jan 1999 19:54:58 -0000 Organization: Customer of Planet Online Lines: 22 Message-ID: <78ij0v$da3$2@news4.svr.pol.co.uk> References: <6cdff5be DOT 36aa6756 AT aol DOT com> NNTP-Posting-Host: modem-83.chlorine.dialup.pol.co.uk X-Trace: news4.svr.pol.co.uk 917294943 13635 62.136.8.83 (25 Jan 1999 20:09:03 GMT) NNTP-Posting-Date: 25 Jan 1999 20:09:03 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-Mimeole: Produced By Microsoft MimeOLE V4.72.3110.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Apester000 AT aol DOT com wrote in message <6cdff5be DOT 36aa6756 AT aol DOT com>... >First, you send the color you want to change to 0x3C8h, then you send R, then >G, then B to 0x3C9h. The ports are set up so that you dont have to send the >color you want to change for each pallete entry, instead you can do (like you >said) > > outportb(0x3C8, 0) > for (x=0;x<256;x++) { > outportb(0x3C9, red[x]); > outportb(0x3C9, green[x]); > outportb(0x3C9, blue[x]); > } > >or something similar. Don't forget the standard palette is only 6 bit not 8 bit, so you may need to divide by 4 to get the correct colour.