I just stumbled upon the same problem, saw your question and found a solution: you need to wait until the widget is implemented, for example. eg:
def print_style(widget): style = widget.get_style() for i in range(5): print i, gdkColorToRgb(style.bg[i]) gdkColorToRgb = lambda gc: (gc.red//257, gc.green//257, gc.blue//257) widget = gtk.HBox()
rumpel
source share