NSColor ... right or wrong?

THIS ^^^^^^
So much seems to not even have a date on it so you can tell if its current or not :frowning:

2 Likes

@DaveS : I’m curious - does the solution work for you?

My solution was to define the “proper” colors (ie those that actually matched a real window) as members of a color set in the Assets.xcassets catalog

Are you trying to recreate the “Disable Window Tinting” from App Wrapper?

no… I’m trying to create a custom NSView that matches a REAL window 100% exactly (in both light and dark mode). Why you say? Because you cannot embed a “real” NSWindow inside another real NSWindow

The “window” in the center is not “real”

If I may, using fixed colors is not going to match a window, if you want it to match a window, I would recommend using what Apple uses for a window, with Window Tinting and all <shudders/>

Not to disagree… but once I determined the “fixed colors”… the above image (where the outside IS a real NSWindow, and the center is not, matched 99.9% in both dark and light modes)

Will it continue to match in the future should Apple change something, guess not… but not sure why they created those named colors in the first place then.

Thinking about it, why not just use a blending mode and clear the area so the actual window background is exposed? Then you’ll always have a correct window background.

because it isn’t a real window… it is an NSVIEW embedded in another NSVIEW(scrollable) which has a default background color that isn’t the normal background of a window (the dark gray in the above image)… That fake window is just another “control” in the greater scheme of the app… a container control that happens to have its own visual effects