View Full Version : Color palette

10-17-2001, 05:49 AM

I'm currently trying to do a simple "Paint" program using OpenGL with Microsoft Visual C++.
My questions are:
1. How do I make a color palette with 256 colors?

2. How can I change the current color by clicking on a point in the palette?

Thankful for answer.


10-17-2001, 07:25 AM
I believe you need to use something called 'color index mode'. It's documented in the red book.

10-17-2001, 11:53 PM
Thank you.

But how can I change the color by clicking on a pixel with the mouse? Any ideas would be helpful.