home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / pascal / 7419 < prev    next >
Encoding:
Text File  |  1992-12-12  |  2.3 KB  |  46 lines

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