![gtk python gtk python](https://i.ytimg.com/vi/_q7EUy1TJWs/maxresdefault.jpg)
Sets whether or not the color button should use the alpha channel. Use `Gtk.ColorChooser:set_use_alpha()` instead. Gtk.ColorButton:set_use_alpha has been deprecated since version 3.4 and should not be used in newly-written code. Set_use_alpha() set_use_alpha (self, use_alpha:bool) Setsrgba to be the current color in theGtk.ColorButton` widget. Gtk.ColorButton:get_rgba has been deprecated since version 3.4 and should not be used in newly-written code. Get_rgba() get_rgba (self) -> color:Gdk.RGBA Gtk.ColorButton:set_rgba has been deprecated since version 3.4 and should not be used in newly-written code. Set_rgba() set_rgba (self, color:Gdk.RGBA) Use `Gtk.ColorChooser:get_rgba()` instead. Gtk.ColorButton:get_alpha has been deprecated since version 3.4 and should not be used in newly-written code. Gtk.ColorButton:set_alpha has been deprecated since version 3.4 and should not be used in newly-written code. Setscolor to be the current color in theGtk.ColorButton` widget. Use `Gtk.ColorChooser:get_rgba() instead. Gtk.ColorButton:get_color has been deprecated since version 3.4 and should not be used in newly-written code. Get_color() get_color (self) -> color:Gdk.Color Use `Gtk.ColorChooser:set_rgba() instead. Gtk.ColorButton:set_color is deprecated and should not be used in newly-written code. Set_color() set_color (self, color:Gdk.Color)
![gtk python gtk python](https://i.stack.imgur.com/S35OO.png)
New_with_rgba() new_with_rgba (rgba:Gdk.RGBA) -> Gtk.Widget Use Gtk.ColorButton:new_with_rgba() instead. Gtk.ColorButton:new_with_color has been deprecated since version 3.4 and should not be used in newly-written code. New_with_color() new_with_color (color:Gdk.Color) -> Gtk.Widget The swatch will be updated to reflect the newcolor when the user finishes. When the buttonis clicked, a color-selection dialog will open, allowing the userto select a color. This returns a widget in the form of a small button containinga swatch representing the current selected color. It is suitable widget for selecting a color in a preference dialog.įunction Details: new() new () -> Gtk.Widget The Gtk.ColorButton is a button which displays the currently selected color and allows to open a color selection dialog to change the color. new_with_rgba (rgba:Gdk.RGBA) -> Gtk.Widget.new_with_color (color:Gdk.Color) -> Gtk.Widget.See also: GtkColorSelectionDialog, Gtk.FontButton Gtk.ColorButton - A button to launch a color selection dialog