06.28.2004 - Color List Favelet
The idea for this latest favelet occured to me when I was sampling colors from various sites for the Color Shift Experiment. Click the eyedropper, click the color, right click to copy the hex value, rinse, repeat...wouldn't it be nice to be able to get a list of all the colors a site uses with the push of a button?
So thats what this new tool does -- it parses through a site's style sheets, style attributes and even COLOR and BGCOLOR attributes (shame on you if you are still using those...) and drops each unique color it finds into a table along with it's hex and RGB values.
A couple of caveats:
- As with the Style Sheet Tweak favelet, if your CSS document is not on the same domain, it can't parse it. Meaning if I use an absolute url to my style sheet as www.slayeroffice.com, but you are visiting the site as slayeroffice.com, it will complain. This is a browser restriction.
- Due to the vastly different ways that MSIE and Mozilla based browsers treat the styleSheet object and the colors it returns, I've written seperate versions for each browser. They are indentical in functionality, though the Mozilla version is much faster.
- Opera provides no access to the styleSheet object, so this thing is pretty useless in that browser. If I'm wrong about this, please tell me how I can go about it.
- It does not list colors that are defined by their names, like "red" or "green".
- It does not check deprecated attributes like ALINK and TEXT.
Should you find that the application is missing any colors you know are defined in a page, please send me a link to the page, the color not being listed and the browser you're using so I can address the problem.
As always, suggestions for improvements are welcome.
Right click the appropriate link for your browser to add this tool to your favorites:
(oh, and slayer rock, hehe..)
Posted by Andrew Krespanis on June 29, 2004 @ 1:36 pm
I usually surf the web with hands of the keyboard and use mouse, but then suddenly have to reach back to keyboard for escape key.
Posted by Andres on June 29, 2004 @ 2:58 pm
Posted by Andrew Wooldridge on June 29, 2004 @ 6:04 pm
Posted by Steve on June 29, 2004 @ 6:09 pm
Posted by Malarkey on June 30, 2004 @ 12:49 pm
You're the dude man.. !
Posted by Dr-Leech on August 10, 2004 @ 2:31 pm
Comments have been closed for this post.