PyGTK Color Selection Dialog - PyGTK

What is PyGTK Color Selection Dialog?

This is a preconfigured Dialog in PyGTK API which allows the user to select and apply color. It internally embeds a gtk.ColorSelection widget.
The gtk.ColorScelection widget presents a colow wheel, and entrance boxes for color parameters such as HSV and RGB. New color can be designated by manipulating color wheel or entering color parameters. Its get_current_color is useful for further processing.

Resulting is the prototype of the constructor of the gtk.ColorSelectionDialog class –

The present selected color is found from the colorsel attribute. The selected color is applied to a widget using modify_fg() or modify_bg() methods.

When the ColorDialog menu button is activated, the resulting callback function is executed –

The selected color is applied to the text in a label widget on the window –


The resulting is the output –


All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

PyGTK Topics