slayeroffice - web experiments gone horribly awry

Looking for the drawings? They're over here, and my drawing blog is this way.

Color List Favelet

  • Current Version: 1.2 for MSIE & v1.3 for Mozilla/Firefox
  • Last Revision: 02.10.2006
  • Language: Javascript
  • Requires: MSIE6, Mozilla, Firefox

This favelet creates a list of all the colors defined in a page by parsing through:

  • Style Sheets - inline, linked and one-level @imports.
  • Inline style attributes. (ie, style="color:#000;")
  • COLOR and BGCOLOR attributes. (You shouldn't use those, by the way.)

It will show a 20x20 DIV element with the color set to its background, the Hex value of the color and the RGB values.

A few caveats:

  • It does not list colors defined by their names, like "red" and "blue".
  • The style sheet parsing is sensative to the location of the CSS document. If that document is on a different host ( is considered a different host than by the browser) the browser will not allow parsing.
  • Since Opera offers no support for the styleSheets collection, it isn't much good in that browser.

Due to the significant differences in the way MSIE and Mozilla based browsers handle parsing style sheets, and even the way colors are returned, separate versions of the favelet exist for each. Bookmark the appropriate link below for your browser:

For Mozilla & Firefox: Color List.
For MSIE: Color List.

02.10.2006 - Update to v1.3 for Mozilla/Firefox & v1.2 for MSIE:

  • Clicking the color swatch will now open a new window to the Color Palette Creator with that color set as the base color.

11.05.2004 - Update v1.2 for Mozilla/Firefox:

  • Updated the application to work on content served as application/xhtml+xml. MSIE does not support this MIME type at this writing, so it's version has not yet been updated.

08.24.2004 - Update v1.1 (both browsers):

  • The Color List window is now dragable. Click and drag from the title bar of the application.