colordom
v0.0.6
Published
A thin wrapper over color.js which allows you to apply an image's dominant color to any DOM element's styles with just an image URL
Downloads
3
Maintainers
Readme
colordom.js
A thin wrapper over color.js which allows you to apply an image's dominant color to any DOM element's color styles (like background color, border color, text color, etc.)
To prevent recomputing a color, it stores the color value after the first time it figures it out.
<div color-backgroundColor="https://via.placeholder.com/150"></div>
<div color-borderColor="https://via.placeholder.com/150"></div>
<div color-color="https://via.placeholder.com/150">text</div>
Scripts
Development
npm run dev
Build
npm run build
Publish
npm version x.x.x
npm publish