[英]uwp acrylic tint color black appears dark gray
In my uwp app I am trying to use the Acrylic Brush, I made a custom one because the default ones are not working for me.在我的 uwp 应用程序中,我尝试使用丙烯酸刷,我制作了一个自定义的,因为默认的不适合我。 But if you notice here I have attached image from Microsoft docs and on right side is window of my app showing acrylic completely different on same background.
但是,如果您注意到这里我附上了来自 Microsoft 文档的图像,右侧是我的应用程序的 window,在相同背景下显示完全不同的亚克力。
Code代码
<AcrylicBrush
x:Key="AppBackgroundAcrylicBrush"
BackgroundSource="HostBackdrop"
FallbackColor="Black"
TintColor="Black"
TintLuminosityOpacity="0.1"
TintOpacity="1" />
After that I tried luminosity to be 0.9 and now it looks dark grayish.之后我尝试将亮度设置为 0.9,现在它看起来是深灰色的。 But I want it to look jet black color Acrylic with small transparency.
但我希望它看起来是黑色的丙烯酸,透明度很小。 Basically I want it to look like as the image shows on left side as in Microsoft docs with 10% luminosity and 100% tint opacity.
基本上我希望它看起来像左侧的图像显示在 Microsoft 文档中,具有 10% 的亮度和 100% 的色调不透明度。
Code代码
<AcrylicBrush
x:Key="AppBackgroundAcrylicBrush"
BackgroundSource="HostBackdrop"
FallbackColor="Black"
TintColor="Black"
TintLuminosityOpacity="0.9"
TintOpacity="1" />
Docs: https://docs.microsoft.com/en-us/windows/uwp/design/style/acrylic文档: https://docs.microsoft.com/en-us/windows/uwp/design/style/acrylic
Basically I want it to look like as the image showson left side as in microsoft docs with 10% luminosity and 100 % tint opacity.
基本上我希望它看起来像左侧显示的图像,就像在 microsoft docs 中一样,具有 10% 的亮度和 100% 的色调不透明度。
Update更新
Base on the testing, TintLuminosityOpacity
0.9 and TintOpacity 1.0 could render you mentioned jet black color AcrylicBrush
.根据测试,
TintLuminosityOpacity
0.9 和 TintOpacity 1.0 可以呈现您提到的墨黑色AcrylicBrush
。 But that is not conformity with document.但这不符合文件。 And the
AcrylicBrush
looks dark gray. AcrylicBrush
看起来是深灰色的。 It is strange, I will report to related team.很奇怪,我会向相关团队报告。 Currently, please try use the following to replace.
目前,请尝试使用以下替换。
<AcrylicBrush
x:Key="CustomAcrylicBrush"
BackgroundSource="Backdrop"
FallbackColor="Black"
TintColor="Black"
TintLuminosityOpacity="1.0"
TintOpacity="1"
/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.