ColorGroups hit and miss

I have been exploring the new ColorGroups a bit which I think have some potential while misses a bit the mark. (Note that I might be misunderstanding something).

So I feel their missing the mark on being cross platform, which again is where their greatest value should have been.

Lets take some examples

I want TextColor - Fundamental flaw with Named colors
Now I can select Named color in the designer, and I can select macOS or Windows. But my App is cross platform. Why can I not select color from the cross platform constants ? Selecting macOS Color is not going to help me much when my App comes on Windows and if I Select the color for Windows then the App is broken on macOS.

This possibly could be addressed by allowing me to add macOS Color group in the designer and Windows and Linux Color group in the designer.

Right now its Default, Desktop and Mobile, so not helpful at all for Desktop cross platform development.

I want Control background color in light mode, but custom chosen pink in dark mode
Here we have the problem that Dual is really just absolute colors, which often is not very helpful, so I cannot choose Control background for the light color. So this is not something I can solve in the designer as is.

I do not know how this would be best solved but obviously it would be best if you could always define as RGB or Platform specific constant or Cross platform constant.

Bottom line
I for the above reasons I found the ColorGroups on Desktop to be more in my way than helping me vs the old way. Which is a bit of a shame since color group concept wise is definitely step forwards and much needed for cross platform development, but the implementation is not good enough for it to be helpful.

Perhaps it should be just Dual And Single (and not the named tab), and then you could always choose either RGB or Constant for any of the colors. And we obviously need cross platform color constants also which would be equal to the Xojo Color theme functions.

And the group adder obviously needs to have Default, Desktop, Mobile, Windows, macOS, Linux, iOS, Android. And not just Default, Desktop and Mobile.

3 Likes

Added high level mock-up of what would need to happen just about for this to become useful feature to cross platform desktop developers:

Missing on the images are combo-boxes behind the constants I guess to actually select. And maybe color selector for when in absolute.

Default shows no platform constant since, it makes no sense there to put either mac specific or Windows constant.

macOS would in platform constant only show macOS constants. And Windows group would only show windows constants in its platform constants.

Universal constant would map to existing Xojo Color Theme functions that are cross platform savvy.

Is difficult to see how any cross platform developer could benefit from color groups without something like this.

2 Likes

I added feedback feature request:

67017 - Make ColorGroup actually be useful for Desktop cross platform applications

(In case if anyone actually cares to have ColorGroups on desktop controls do something useful for your Cross platform Desktop applications)

The problem with this is that (at least on iOS and macOS) there are colors that change each time a major version of the OS is released and to keep your apps looking native, you really do need access to the named colors. For a while there, Apple regularly added some new colors each year, and that trend finally settled down about 2 years ago when they got dark mode finalized across iOS and macOS.

In my suggestion you can access the named colors…

The way you have it now then it benefits basically no-one.

In the drawing Platform constant is basically NamedColor, while Universal constant would be mapped to Xojo Color functions.