home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!spool.mu.edu!uwm.edu!cs.utexas.edu!torn!news.ccs.queensu.ca!slip206.telnet1.QueensU.CA!dmurdoch
- From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
- Subject: Re: Faking millions of colors out of 16, and so on
- Message-ID: <dmurdoch.228.724214491@mast.queensu.ca>
- Lines: 34
- Sender: news@knot.ccs.queensu.ca (Netnews control)
- Organization: Queen's University
- References: <1992Dec12.234840.199@athena.mit.edu>
- Date: Sun, 13 Dec 1992 02:41:31 GMT
-
- In article <1992Dec12.234840.199@athena.mit.edu> acgoldis@athena.mit.edu (Andrew C Goldish) writes:
- >According to the Borland 6 graphics package and the rules for my monitor, one can
- >set the sixteen colors in the palette to be different things with the
- >SetRGBPalette command. Is there any way one can print sixteen colors, change one
- >of the values, and print a 17th color on the screen without having the pixel
- >originally in the color that was changed change to the new color?
-
- Only if you're very fast. The EGA or VGA hardware standard that the 16
- colour modes are using is only able to display 16 different colours
- simultaneously. However, pixels only get updated on the screen 50 or 60
- times per second. If you like, you can change the palette after a pixel has
- been drawn, write a different pixel in a 17th colour, and change palette the
- back by the time the card refreshes the first pixel.
-
- Soon after the EGA came out there was a program published in PC Magazine
- that could use this technique to display 64 colours simultaneously on a 6
- Mhz AT; I'd guess a modern PC would have enough time left over to get some
- useful work done at the same time it was flipping the palette around like
- this.
-
- Of course, this is isn't very useful in general; you wouldn't be able to put
- 17 different coloured pixels all in the same scan line, for instance.
- You're much better off using a 256 (or more) colour mode, or dithering to
- get colours by mixing different colours of pixels together.
-
- >Also, how exactly do you get certain colors using Red, Green, and Blue
- values>(i.e. purple, pink salmon, Celtic green, etc.)
-
- Find or write a palette editing program, and just hold colour samples up to
- your screen until you can get a match. Or buy a colour scanner, and see what
- colour it sees. Or just fool around until you get something you like.
-
- Duncan Murdoch
- dmurdoch@mast.queensu.ca
-