AHHHH -
* JonB is not always that bright.
I found another error using your tool. I can't figure this one out though it looks like a parsing error. Again it ocurred on the color attribute.
See attached.
As for RGB method, there are two supported notations RGB byte value (0-255) per channel nd RGB percentage 0-100% per channel. I have never used the last method, but I was able to finf plentry of references to using it. I can see how it would be very useful in generating charts or manipulating things like color wheel selectors for theme builders. (for eample <wink>) In things like jscript applets etc.
If you are going to make this general purpose, I suggest you DON'T convert RGB values to hex and then write that to the updated file. For a couple of very sound reasons.
Here's my thinking.
Presumably - if there rgb notation in the source Stylesheet then the authors/collaborators may use that method in other sheets as well. Writing it back in hex, will make bug tracking very difficult.
I also realize that in 'mixed' notation - you wouldn't want to have to add a field or flag for color method notation.
Here's 'my idea'
offer an option to 'Convert Color to' <hex>, <rgbB> <rgb%> and make a conversion pass.
And if they don't, then the code stays in its original state - i.e. mixed. Persumably, if the syntax is right, it will render correctly.
I know you are busy on many things (so am I - can you say 14 hrs day - lol), so respond only when you have a chance
I do think you have the basis for a nice piece of shareware or donate ware here. The littlest pieces of software are often the most useful. I do lots of graphic stuff and I would be lost without all my wonky toys like rulers, colorpickers. color guides and my own prototyping color-schema tools (nothing as elaborate as this, lol) Other than full blown CSS editors, I'm not aware of another tool this lightweight that works quite like this... Good Work.
OK I should say God Bless ACDSee. BreezeBrowse and N'amo for cutting huges amounts of time from my work.
You probably already have this link BUT if not -
http://www.december.com/html/spec/colordef.htmlI think they have some of the best, most comprehensive discussions of color.
I don't know how much you think about this aspect, but I wound up with a collaborator who was a color blind artist! that's a head shaker, huh?. No affect on the processing centers, and a purely genetic inhibitor on receptors. BUT a practical impossibility. (He dropped out of art school and became a nurse - still draws for me though) He made me think about testing web designs that are 'subtle' to make sure color 'cueing' isn't a problem in the interface. In the end I developed some rules of thumb based on luminosity that worked very well - with some help indirectly from Photoshop's web color picker. I'll round up some good color picker examples and forward them. I have links on that stuff if you want them.
the error I menioned is attached
thanks for all your work
8)