From: "Obsidian" Newsgroups: comp.os.msdos.djgpp Subject: Re: I NEED SOME ANSWERS TO MY QUESTIONS Date: Tue, 23 Mar 1999 13:57:08 +0200 Organization: Adamastor Lines: 27 Message-ID: <7d7vit$40b$1@news.adamastor.ac.za> References: <19990322163156 DOT 10646 DOT 00000122 AT ng-fb1 DOT aol DOT com> NNTP-Posting-Host: 146.232.2.37 X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Et1850 wrote in message <19990322163156 DOT 10646 DOT 00000122 AT ng-fb1 DOT aol DOT com>... >Some Questions > >1. how do i get and r,g,b, into a one diget color. rgb needs three numbers but > the command in allegro want one number. > > RGB mycolor = {43,56,123}; *rgb colors here are ex. > > set_color = (0,mycolor); *Wrong, mycolor is not const > (0,&mycolor) *Wrong, mycolor is not int You could just use makecol(mycolor.r,mycolor.g,mycolor.b) or you could try and convert it yourself using bitshifts, but then you could make a mistake if you use another color depth. I hope this helps. Obsidian