GimpUi.ColorButton

const GimpUi = imports.gi.GimpUi;

let colorButton = new GimpUi.ColorButton({
    area_height: value,
    area_width: value,
    color: value,
    continuous_update: value,
    title: value,
    type: value,
});
  

This widget provides a simple button with a preview showing the color.

On click a color selection dialog is opened. Additionally the button supports Drag and Drop and has a right-click menu that allows one to choose the color from the current FG or BG color. If the user changes the color, the "color-changed" signal is emitted.

Hierarchy

  • GObject.Object
    • GObject.InitiallyUnowned
      • Gtk.Widget
        • Gtk.Container
          • Gtk.Bin
            • Gtk.Button
              • GimpUi.Button
                • GimpUi.ColorButton