creating a color palette


I want to create a color palette for my painting program. Its just some kind of polygon with all colors on it and I should be able to select based on the intersected color.Can someone help me how to do this pls.

Thanks & Regards,

Can’t you use the colour palettes included with GUI libraries?

brett01, you can use glReadPixels() on the pixel at mouse position, you will be able to read its exact color.