Replies: 1 comment 2 replies
-
Hmm, good catch. This seems to be an issue only for text and only for certain font sizes (small enough). <StackPanel>
<Glyphs FontUri="C:\WINDOWS\Fonts\TIMES.TTF" FontRenderingEmSize="33" UnicodeString="Hello World!" Fill="#B8000000" />
<Glyphs FontUri="C:\WINDOWS\Fonts\TIMES.TTF" FontRenderingEmSize="34" UnicodeString="Hello World!" Fill="#B8000000" />
</StackPanel> Same with |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m trying to implement a text color in WPF that matches CSS RGBA of
#00,00,00,0.72
on a white background. I’d expect that to be a color of#B8000000
(alpha of dec 184 ≈ .72), yet the result is much lighter than expected. Applying opacity to the control itself works as expected.I'm expecting the composite color to be
#474747
as produced by CSS and paint.net, but I'm getting#8C8C8C
. Does WPF render alpha on a brush differently somehow?Here is an example:

Any help is appreciated!
Beta Was this translation helpful? Give feedback.
All reactions