On 5 Oct 2018, at 10:25, Allan Odgaard
There are no semantic colors for gradients or even highlighted search results as in
And I am not aware of how we can introduce our own semantic colors without asset
catalogs, as the RGB value of a semantic color is not resolved until it is being used
(i.e. have a graphics context), but there does not appear to be an NSColor API for this
(beyond set, but probably can’t rely on that working 100% of the time, e.g. when other
colors are derived from the base color).
I’m not expert on this subject but I did have a look at the “Advance Dark Mode” WWDC video
. If the asset catalog or the built-in dynamic colors are not flexible enough a view
can do appearance sensitive work in the following methods: “updateConstraints",
"layout", "draw:dirtyRect" and "updateLayer”. The current
appearance can be queried using “effectiveAppearance” and “bestMatch” can be used on the
But if you can upgrade Xcode to a later version it would be much simpler.