Color picker dialog with transparency

Is there a way to get a color selection dialog on Windows and Linux that handles transparency.

I tried DesktopColorPicker, Color.SelectedFromDialog with the now undocumented parameter showAlpha (which I found in the forum, and in Xojo documentation provided by hubwiz but not from Xojo’s own. I could not find anything about that being deprecated or any note concerning, or indeed a reason for, the signature change).
Furthermore I tried the deprecated SelectColor function.

If there is no no way to achieve this from the framework provided with Xojo, I assume my options are

  • use a transparency setting outside the color selection dialog
  • create a custom color selection dialog

For the latter option, does anybody know of such a dialog available somewhere that could be included in an open source program using GPL-2.

You could make your own with a canvas and some sliders.

@GarryPettet has his XUI project at https://github.com/gkjpettet/XUI that includes a colour picker with an Alpha selector.

Though I’ve not used this particular control of his, I believe it is x-platform.

1 Like

It looks like the WinUI has a color picker that could be implemented using xojos XAML stuff. That would leave you with having to recreate the Linux one if you wanted native looking pickers.

Thanks for the pointer to the XUI Framework.
I believe his EULA is incompatible to the GPL, because it prohibits sharing the source.

Thanks for that pointer.

Yes, I would like to retain native controls where possible. XAML stuff tends to look quite different from controls and dialogs used by Win32 in general and Xojo API v1 in particular. But maybe it is still worth it.

Right now, our app is still 32-bit for Windows. So XAML is not a option until all other system calls are checked and updated.

Well the win32 native color picker doesn’t support alpha so you’re going to have to create your own.