Python - GTK4/ADw - Custom ColorChooser

Hi,
I am currently getting my hands dirty with my first GTK4/Adwaita GUI.
It is a GUI version of a python script that i wrote which creates a specific xml file that can be loaded onto leica surveying devices.

In one part of the app i want the user to be able to choose a color. I would love to just use an Adw.ActionRow with a Gtk.ColorDialogButton attached to it.
The issue is that i am limited to 32 specific color values, so i have to limit the the options the user can select.

With the Gtk.ColorChooserDialog Widget (now deprecated) it was possible to provide a Color pallete using “add_palette” but i don’t want to use any deprecated widget. Also it was still possible to select a custom color this way.

The new Gtk.ColorDialog does not support custom palettes am i right?

I can probably build a similiar looking dialog out of a grid of colored buttons but i before i spent a lot of time doing this i just wanted to make sure there is no easier solution :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.