Hi,
on my macOS app I would like to set the window background color as the titlebar background color such a way to get a unique color all over the window on both light and dark mode.
But I cannot find the way to read the titlebar background color nor I found a standard color name for that. How can I do that?
on my macOS app I would like to set the window background color as the titlebar background color such a way to get a unique color all over the window on both light and dark mode.
But I cannot find the way to read the titlebar background color nor I found a standard color name for that. How can I do that?
I think that titlebar has in fact the color of the window background, plus a non transparent effect that dims the bg color.
Making the titlebar transparent will give it the exact color of background.
You could try this (I tested, got a uniform red color):
window?.titlebarAppearsTransparent = true // gives it "flat" look
window?.backgroundColor = .red // set the background color
https://stackoverflow.com/questions/47759424/how-to-colour-the-titlebar-of-nswindow
Or look at this:
https://stackoverflow.com/questions/47759424/how-to-colour-the-titlebar-of-nswindow
Making the titlebar transparent will give it the exact color of background.
You could try this (I tested, got a uniform red color):
window?.titlebarAppearsTransparent = true // gives it "flat" look
window?.backgroundColor = .red // set the background color
https://stackoverflow.com/questions/47759424/how-to-colour-the-titlebar-of-nswindow
Or look at this:
https://stackoverflow.com/questions/47759424/how-to-colour-the-titlebar-of-nswindow