Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!noao!ncar!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!haven.umd.edu!uflorida!reef.cis.ufl.edu!jdb From: jdb@reef.cis.ufl.edu (Brian K. W. Hook) Newsgroups: comp.os.msdos.programmer Subject: Re: How to mix colors in Turbo C ??? Message-ID: <28321@uflorida.cis.ufl.EDU> Date: 30 Apr 91 17:35:23 GMT References: <2530@pdxgate.UUCP> Sender: news@uflorida.cis.ufl.EDU Organization: UF CIS Dept. Lines: 23 I don't think mixing colors is going to be as easy as using setcolor(). Setcolor takes an enumed integer from 0-15, I believe (may be different for the 256color BGI). If you look in you will see that the color values are in fact enumerated. Thus, ORing them won't work. If you are in a 16 color mode with an EGA/VGA board, you would have to probably remap your pallete using remappallete() or setpalette(), can't remember which is the correct name. This reduces the amount of available colors though (since if you have 8 shades of grey, you can still only have 8 more other colors). This is how EA gets that lifelike King Tut picture using an EGA. They remap the colors to pretty much all shades of yellow/gold. If you don't want to reduce the amount of colors available, you must resort to dithering. The crude method would be to use setlinestyle() and setfillmask(). But if you would like to be sophisticated about it, try getting a good book on graphics that covers dithering. If you are using 256 color VGA, you probably have the 256 color BGI, and then you are set. I have never used this BGI, so I can't say much about it. Brian