为什么xaml页面和网页之间的十六进制颜色不同? [英] Why is the hexadecimal color different between xaml page and web page?
本文介绍了为什么xaml页面和网页之间的十六进制颜色不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在xmal页面中,代码为:
In xmal page,the code is:
<Rectangle Width="15" Height="15" Fill="#FF405FD0" />
但在网页上,这是错误的,我只能使用''#405FD0''没有''FF''!!!
为什么它们不同???
but in web page,it is wrong,I can only use ''#405FD0'' without ''FF''!!!
why are they different???
推荐答案
没有人说,wpf中的颜色值是html颜色代码。请看这里: http://msdn.microsoft。 com / en-us / library / system.windows.media.brushes(v = vs.85).aspx [ ^ ]
文章中有评论:
Nobody said, that the color values in wpf are html color codes. Look here: http://msdn.microsoft.com/en-us/library/system.windows.media.brushes(v=vs.85).aspx[^]
There is a comment in the article:
Quote:
<!-- Note that the first two characters "FF" of the 8-digit
value is the alpha which controls the transparency of
the color. Therefore, to make a completely transparent
color (invisible), use "00" for those digits (e.g. #000000FF). -->
因此,这些颜色代码是RGBA [ ^ ]代码。现在关于html:CSS3支持alpha cahannel,但不支持十六进制代码(参见 [ ^ ])。
So, those color codes are RGBA[^] codes. And now about html: CSS3 is supporting alpha cahannel in, but not in hexadecimal code (see[^]).
这篇关于为什么xaml页面和网页之间的十六进制颜色不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文