Link colour on macOS 26

11 views
Skip to first unread message

Robert Roebling

unread,
Feb 4, 2026, 2:57:38 PM (23 hours ago) Feb 4
to wx-...@googlegroups.com
Hi all,

currently, the link colours are hardcoded in hyperlink.h and result in
unreadable links in dark mode on macOS Tahoe. Exchanging the code with

return wxSystemSettings::GetColour( wxSYS_COLOUR_HOTLIGHT );

produces perfect results. Maybe someone could test this on Windows in
light and dark mode.

Robert

Vadim Zeitlin

unread,
Feb 4, 2026, 4:14:50 PM (21 hours ago) Feb 4
to wx-...@googlegroups.com
On Wed, 4 Feb 2026 20:57:19 +0100 'Robert Roebling' via wx-dev wrote:

RR> currently, the link colours are hardcoded in hyperlink.h

Do you mean GetLinkColour() in wx/private/hyperlink.h?

RR> and result in unreadable links in dark mode on macOS Tahoe.

If so, this is strange, as #87cefa is supposed to have contrast with dark
background... What is the background colour there?

RR> Exchanging the code with
RR>
RR> return wxSystemSettings::GetColour( wxSYS_COLOUR_HOTLIGHT );
RR>
RR> produces perfect results. Maybe someone could test this on Windows in
RR> light and dark mode.

Looking at

https://github.com/wxWidgets/wxWidgets/blob/7ba5acc72c22d5cf36f33ac927b4b11f0ffa477e/src/msw/hyperlink.cpp#L257-L258

it seems like it works in light mode but not in the dark one. And I'm not
if changing wxSYS_COLOUR_HOTLIGHT in dark mode is going to work: it's also
used for the current notebook page background and this shouldn't be the
same as link colour. Although I don't really know why do we use foreground
colour (which wxSYS_COLOUR_HOTLIGHT is supposed to be, I think) for the
background.

Regards,
VZ
Reply all
Reply to author
Forward
0 new messages