I opened the XP image in GIMP and used the color picker to check because I have trouble seeing the gradient, perhaps because of the lighting conditions in my office. And sure enough the top and bottom are different colors. It seems the only way to query style colors is through .Net which I would rather not get into as it means distributing the .Net framework. I think the best solution for me is to over ride EV_WIDGET_IMP and add a function actual_background_color and use GetPixel to test for the top left pixel. (And whatever the equivalent is in GTK) I can then query the horizontal button box container using a "once on idle" agent to set the button image background. Thanks for the tip about EV_PIXEL_BUFFER. I think I did try using it before but had some trouble with it. Can't remember exactly what. At the moment I use EV_PIXMAP.set_with_named_file. I am not sure if there is any advantage to use JPEG.