PostCSS PostCSS plugin getting image dominant color.
.photo {
background-color: image-color("photos/summer.jpg");
width: 200px;
}
.photo {
background-color: rgb(151, 189, 212);
width: 200px;
}
postcss([ require('postcss-image-color')({basePath: 'assets/images'}) ])
See PostCSS docs for examples for your environment.