开发者

Why is System.Drawing.Color.Green (0, 128,0)?

I tho开发者_开发百科ught it should be (0,255,0). Anyone know why?


Because the .NET framework uses the W3C version of the X11 color names. There's apparently two different "Green" colors, the X11 one which is (0, 255, 0), and the W3C one which is (0, 128, 0).

It is apparently not known why the W3C (or anybody) adopted this particular list of colors as standard, although I speculate that it's because it's the only real extensive list of "easy-to-use, human-readable" names for some RGB values (I personally can't imagine what the color #6495ED looks like until I look it up).

There are differences between the W3C and X11 list (like "Gray" and "Purple" having different RGB values between W3C and X11). Also, the .NET framework defines "DarkSeaGreen" as (143, 188, 139) instead of (143, 188, 143). I wouldn't be surprised if the rationale for these different values was "it looked more Green/Gray/Purple/etc."

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜