$ npm i -D lepto-vibrant-color
See lepto documentation for usage.
This plugin use the node-vibrant
module.
Default options:
"use": [
{
"name": "lepto-vibrant-color"
}
]
The different vibrant colors are:
- vibrant
- lightVibrant
- darkVibrant
- muted
- lightMuted
- darkMuted
If you use an image as a css background-image
, you can easily set the element's background-color
to one of its vibrant color. Don't worry, background-image
will always override background-color
when the image is loaded. You could also use the background
shortcut:
<div class="some-class" style="background: #4b8dbc url(assets/output/image.jpg);"></div>
This project is licensed under the MIT license.