WynApse Home Page
Home    Blog    About    Contact       
Latest Article:


My Tags:
My Sponsors:







Lifetime Member:

RGB, aRGB, now scRGB... what is that?


So there I am working my way through the WPF/E QuickStart. After spending almost a year of my life building a full-border skinned subclass for Dialog boxes in VC6, I think I'm a pretty knowledgable graphics guy.

So I get to the button example on the last section, and I find Fill="sc#1, 0.8123474, 0.8123474, 0.8123474". I look through the rest of the WPF/E documentation and can't find anything, so what's up with that?

That sc#1, ... is obviously a color of some sort, since it is given as a Fill value, but it's amazing how hard it was to find any information about it on the web.

The best article I could find is one by Tim Sneath: Which Colour Is Darker in WPF - Gray or DarkGray?.

I'd be shocked if we all were not familiar with the RGB format of expressing a color, and with WPF it's easy to recognize the "alpha channel" support which amounts to an opacity value given ahead of RGB: #AARRGGBB.

The sc-value listed above is listed in Tim's article as "scRGB", for which you can find many articles... now that we know where to look!

Another article at winsmarts.com :WPF: Welcome scRGB – New friend of Red, Green, Blue quotes from Charles Petzold's WPF book, and makes sure that scRGB is much more complex than aRGB.

I'm not sure why it was decided to use the sc#1 code in the QuickStart, but don't let it slow you down, it's just a color code. A very hi-res one, but color to be sure.


Microsoft MVP

Member of WPF and Silverlight Insiders
Silverlight Control
Creative Commons License

Copyright © 2006-2014, WynApse