From: T DOT Harte AT btinternet DOT com (Thomas Harte) Newsgroups: comp.os.msdos.djgpp Subject: Re: Can I use 256 grayscale colors? Date: Fri, 13 Jun 1997 17:09:34 GMT Organization: BT Internet Lines: 34 Message-ID: <33a17e53.12459438@news.btinternet.com> References: <5npo2o$k8v$1 AT jaist-news DOT jaist DOT ac DOT jp> NNTP-Posting-Host: host5-99-56-75.btinternet.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On 12 Jun 1997 21:01:12 GMT, suganuma AT jaist DOT ac DOT jp (SUGANUMA yoshinori) wrote: >Hello. > >I would like to use 256 grayscale colors with djgpp. >Is it possible? and are there any libraries to do so? > >I tried allegro2.2 with GFX_ET4000 gfx_mode, but I could only >obtain 64 grayscale colors. >e.g. >set_gfx_mode(GFX_ET4000,640,480,0,0); >for(c=0;c<256;c++){ > pallete[c].r=c; > pallete[c].g=c; > pallete[c].b=c; >} >These palletes seem to repeat 64 grayscale colors for 4 times >with my video card, ET-4000/W32 2Mram. Indeed, any 256 colour mode will have this limitation, because when VGA was created, they only allowed a value between 0 and 63 (inclusive) to be stored, therefore only 64 shades of true black / white are available, therefore in a 256 colour palette, you will simply get the same 64 colours (256/64) 4 times over. As I say, this is a limitation of VGA and those 256 colour modes based upon it, and not a software problem. -Thomas > >Thanks. > >-- >suganuma