CheckBox label foreground color on MacOS

Operating system:
MacOS 11.7.4
Also on MacOS 12

wxPython version & source:
4.2.0 cp39 macosx_10_10 universal2 whl

Python version & source:
3.9.16 CPython

Description of the problem:

Dark desktop is always a pain, a source of troubles. In MacOS, the label color of the CheckBox is not enforced. SetForegroundColour is not done for the checkbox label. Hence on dark desktop, when the app plane is clear, the text label appears as white, and one can’t see it.

A small example : When the panel background is white (or clear), the cb label is invisible.

self.cb1 = wx.CheckBox(self, wx.ID_ANY, u"Im the CB label", wx.DefaultPosition, wx.DefaultSize, 0)
self.cb1.SetForegroundColour(wx.Colour(0, 0, 0))
bSizer11.Add(self.cb1, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5)

Is there any other way to color the checkbox label which works on MacOS ?

If the SetForegroundColour doesn’t work on MacOS, have you tried setting the background colour, altered enough to be able to see it. wx.Colour has a ChangeLightness (r, g, b, ialpha) function, where ialpha is between 0 Black and 200 White.

You can use it like this: wx.Colour(my_colour).ChangeLightness(140)