Gtk.Widget.prototype.modify_base

function modify_base(state:Gtk.StateType, color:Gdk.Color):void {
    // Gjs wrapper for gtk_widget_modify_base()
}

Sets the base color for a widget in a particular state. All other style values are left untouched. The base color is the background color used along with the text color (see Gtk.modify_text) for widgets such as Gtk.Entry and Gtk.TextView. See also Gtk.modify_style.

<note><para> Note that "no window" widgets (which have the %GTK_NO_WINDOW flag set) draw on their parent container's window and thus may not draw any background themselves. This is the case for e.g. Gtk.Label. </para><para> To modify the background of such widgets, you have to set the base color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in a Gtk.EventBox widget and setting the base color on that. </para></note>

state

the state for which to set the base color

color

the color to assign (does not need to be allocated), or null to undo the effect of previous calls to of Gtk.Widget.prototype.modify_base.