I would like to know whether it is possible to control the amount of translucency in the so-called vibrancy effect introduced recently by Yosemite, which can be implemented in an Objective-C app by employing the NSVisualEffectView
class.
Here is an example to be more specific. Consider the translucent effect which is shown by Yosemite OS X when the volume level is changed:
The vibrancy is much stronger than what one obtains by using a simple NSVisualEffectView
(shown in the following image)
If we compare the two images — please, ignore the different form of the speakers but focus on the background — we see that the amount of vibrancy (the strength in the Gaussian blurring effect) is much stronger in the Yosemite OS X volume window instead of my app using NSVisualEffectView
. How can one obtain that?
In OS X Yosemite Apple introduced new materials that can be applied to NSVisualEffectView.
From the AppKit Release Notes for OS X v10.11:
NSVisualEffectView has additional materials available, and they are now organized in two types of categories. First, there are abstract system defined materials defined by how they should be used: NSVisualEffectMaterialAppearanceBased, NSVisualEffectMaterialTitlebar, NSVisualEffectMaterialMenu (new in 10.11), NSVisualEffectMaterialPopover (new in 10.11), and NSVisualEffectMaterialSidebar (new in 10.11). Use these materials when you are attempting to create a design that mimics these standard UI pieces. Next, there are specific palette materials that can be used more directly to create a specific design or look. These are: NSVisualEffectMaterialLight, NSVisualEffectMaterialDark, NSVisualEffectMaterialMediumLight (new to 10.11), and NSVisualEffectMaterialUltraDark (new to 10.11). These colors may vary slightly depending on the blendingMode set on the NSVisualEffectView; in some cases, they may be the same as another material.
Even though this only applies for OS X El Capitan, you can now create a more "close to original" blur effect for your view. I assume Apple uses the NSVisualEffectMaterialMediumLight
material for its volume view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With