An open API service indexing awesome lists of open source software.

https://github.com/ryelle/image-colors


https://github.com/ryelle/image-colors

Last synced: 10 months ago
JSON representation

Awesome Lists containing this project

README

          

# image-colors

A quick proof-of-concept using the PHP code from [Dominant Colors for Lazy-Loading Images](https://manu.ninja/dominant-colors-for-lazy-loading-images) to generate the main color of an image, and the color with higher contrast (white or black).

## To Use

1. [Download the zip](https://github.com/ryelle/image-colors/archive/master.zip)
2. Drop in your WordPress install & activate the plugin.
3. Upload an image
4. Check out the post meta with key `kdic_color_info` to see the color, and contrast color.

To see a visual representation, activate Twenty Fifteen & view any post or page with a featured image. You should see a colored border around the image.