From: "DeHackEd" Newsgroups: comp.os.msdos.djgpp References: <19990309135800 DOT 23917 DOT 00000102 AT ng-ce1 DOT aol DOT com> Subject: Re: colors from hex to dec - newbee -major stumped Lines: 24 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.0810.800 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800 Message-ID: <89fF2.4372$G26.352@tundra.ops.attcanada.net> Date: Tue, 09 Mar 1999 20:04:20 GMT NNTP-Posting-Host: 142.194.222.24 X-Trace: tundra.ops.attcanada.net 921009860 142.194.222.24 (Tue, 09 Mar 1999 20:04:20 GMT) NNTP-Posting-Date: Tue, 09 Mar 1999 20:04:20 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com If you are talking about constructing a colour code from red green blue values to an encoded number, the format is: int col = makecol(red, green, blue); Your grey would be something like: col = makecol(128, 128, 128); Lower numbers are darker, higher are lighter. "col" can be used as the colour paramater to line or drawbox type commands. By just looking at your "323232" idea for a background colour, and my scientific calculator, I assume it came out to be an odd shade of cyan/green? What colour depth are you using anyway? -- "DeHackEd" My Email address in the header is fake (spammers). Email me at this address: http://www.geocities.com/cgi-bin/homestead/mail.pl?dehacked