Colours wrong on mac

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
DaleyPaley
In need of some credit
In need of some credit
Posts: 4
Joined: Tue Jan 18, 2022 11:20 am

Colours wrong on mac

Post by DaleyPaley »

I have a simple wxFrame containing a wxTextCtrl. I also have a setColour function that sets the SAME background colour for both.
This function works if I get a colour from a colour dialog. But the same function does't work if I call it on startup. What happens is the textctrl background is correct but the frame background is a bit darker.
It is exactly the same issue discussed here: https://github.com/wxWidgets/wxWidgets/issues/14482, a closed bug report from nearly 10 years ago.
I am using a fresh, latest, development version 3.1.5.
It seems that macos colour profiles are just a real pain in the neck. Is there anything I can do to get the same colour appearing for two elements that are set with the same colour. It's really annoying. Especially annoying as it works when I set it from my preferences, but upon startup, when I set the same colours, it looks different, even though the exact same RGB values are being passed in.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Colours wrong on mac

Post by ONEEYEMAN »

Hi,
Can you post some code and a screenshot of how it looks like?

Thank you.
Post Reply