for (y = 0; y < 256; y++) {
CGDeviceColor c = CGPaletteGetColorAtIndex (pal, y);
unsigned char r = c.red * 255.0;
unsigned char g = c.green * 255.0;
unsigned char b = c.blue * 255.0;
for (y = 0; y < 256; y++) {
CGDeviceColor c = CGPaletteGetColorAtIndex (pal, y);
unsigned char r = c.red * 255.0;
unsigned char g = c.green * 255.0;
unsigned char b = c.blue * 255.0;