stylesheet-colors

1.0.0 • Public • Published

stylesheet-colors experimental

Get a unique list of all the colors used in your current page's stylesheets.

Usage

NPM

colors = getColors([stylesheet(s)])

Returns an array of colors found in your stylesheets, e.g.:

[
  'rgb(25, 25, 25)',
  'rgba(35, 25, 25, 0.2)'
]

Optionally you can pass in your own selection of stylesheets from document.styleSheets or an individual one – by default all of the current page's stylesheets will be used.

License

MIT. See LICENSE.md for details.

Package Sidebar

Install

npm i stylesheet-colors

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • hughsk