[Interest] How to get active button color in macOS?

Nils Jeisecke nils.jeisecke at saltation.com
Wed Jan 30 12:53:48 CET 2019


Am 30.01.2019 um 02:27 hat Patrick Stinson geschrieben:
> Hello!
> I am trying to figure out how to get the following color for macOS
> (see screenshot) which is called “Accent Color" in the General section
> of System Preferences.

I'm afraid there's only the "highlight" color available (which is derived
from the accent color by default but can be changed). You can use native
API to get the accent color.

Qt palette is kind of stuck at representing Windows 95 like UIs, it has
even color values for drawing fancy grayish 3D buttons ;-)

Given that Windows 10 also has some kind of accent color I would welcome
an additional palette entry. This could be the same value as highlight
on platforms that don't support accent colors.

On systems with accent color support usually the "accent color" is
used for list selection, toggles, checkboxes and control indicator
styling (like the open button of a combobox). "highlight" is meant for
user selection in input fields etc.

I'm not sure if adding another color entry is possible in Qt5 though.


More information about the Interest mailing list