[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page

Top Document: comp.windows.x Frequently Asked Questions (FAQ) 7/7
Previous Document: 176) Why doesn't GXxor produce mathematically-correct color values?
Next Document: 178) Why do I get a protocol error when creating a cursor (sic)?


177) Why does every color I allocate show up as black?



	Make sure you're using 16 bits and not 8.  The red, green, and blue 
fields of an XColor structure are scaled so that 0 is nothing and 65535 is 
full-blast. If you forget to scale (using, for example, 0-255 for each color) 
the XAllocColor function will perform correctly but the resulting color is 
usually black. 

[Thanks to Paul Asente, asente@adobe.com, 7/91]



Top Document: comp.windows.x Frequently Asked Questions (FAQ) 7/7
Previous Document: 176) Why doesn't GXxor produce mathematically-correct color values?
Next Document: 178) Why do I get a protocol error when creating a cursor (sic)?

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page


[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
faq%craft@uunet.uu.net (X FAQ maintenance address)

Last Update October 22 2009 @ 05:36 AM

Some parts © 2009 Advameg, Inc.