https://github.com/ryelle/image-colors
https://github.com/ryelle/image-colors
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ryelle/image-colors
- Owner: ryelle
- Created: 2016-09-12T15:59:10.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-12T16:07:28.000Z (almost 10 years ago)
- Last Synced: 2025-10-04T11:48:46.799Z (10 months ago)
- Language: PHP
- Size: 1.95 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.