I use ColorGroups extensively in my custom controls as they work really well for me.
Currently there is no way to set both the light and dark mode colour for a ColorGroup property in the IDE. In the inspectors, you can only set a single colour (the light mode colour) for ColorGroup properties.
If you’d like to see a way to do this in the IDE, please thumbs up the feedback case above (since this seems to be the only way to get Xojo to implement a feature request).
Not being able to set both values in the IDE really lowers their usefulness.
Do you have the wrong word in your title and post? You can set Light and Dark mode colours, that’s the point of ColorGroup. The ticket linked is for displaying them simultaneously.
To set both colours, select “Dual” mode. The Light mode colour is on the left, indicated by the light background. The Dark mode colour is on the right, indicated by the dark background.
What I’m looking for is a way to stipulate say red for light mode and green for dark mode when there is a ColorGroup property in the inspector. Will this achieve this?
What this feature request was asking was displaying the preview for light and dark mode directly in the inspector. Current release will just display the light color in the inspector, but it will use the dark one at runtime.
I think I mean something else (the feedback request was created by someone else - I just added a thumbs up to it).
I have a code editor canvas control that is very customisable. All colours that can be changed are ColorGroups. For example, the BookMarkColor is displayed in the Xojo IDE inspector when you select the control:
In code, I can programatically make BookMarkColor be green in light mode and blue in dark mode like this:
MyControl.BookMarkColor = New ColorGroup(Color.Green, Color.Blue)
What I want is a way to be able in the IDE inspector to select from a color picker green for light mode and blue for dark mode. In my screenshot above you can see that the arrowed BookMarkColor property just shows the normal Color property picker (currently set to blue). This will result in the property always being blue in both light and dark mode.
Essentially, what I think you need to do in the inspector beside ColorGroup properties is not have a popup with a single colour but perhaps two buttons beside each other, one for light and one for dark mode.
Humbly disagree. I like the fact that ColorGroups are managed globally for reuse purposes. The whole purpose of the ColorGroup is to not have to set those individual colors every freaking time, not to mention all of the “named colors” where the light and dark variants come from the OS.
I’m a firm “please don’t do this” regarding this idea.
As I’m understanding things now, the feature Garry may be asking for is to improve the workflow so that reusable ColorGroups can be created from the Inspector in that spot.
I do agree that creating one-off property level ColorGroups would be akin to writing HTML inline styles instead of using a style sheet. I think that would make working on a project more difficult.
I don’t understand this, BookMarkColor is a ColorGroup assigned by code, right? and is displaying Blue because you are in dark mode, no? If you were in Light mode it should show Green, no? Are you saying that your app when run displays Blue in both Light/Dark modes or just the IDE?
So you want to create ColorGroup in code (not using the IDE), then use the IDE to edit the color definition that you created by code? I think I don’t understand.
As there is already a dedicated ColorGroup editor, maybe we can improve the workflow by adding a new option in the PopupMenu “Add new ColorGroup”, that creates a brand new ColorGroup, assigns it to that property and shows the editor.
For editing the current one, a pencil button on the right side of the selector can redirect you directly to that ColorGroup editor.
This should be a new Feature Request in any case.
That’s too far from my comfort zone I’m afraid , I was just passing by. I’ll add my thumbs up and bring it to the team.