Image Color Extract
The Image Color Extract PHP class pulls the most common colors out of an image file. The color values are in hexidecimal. You can try it out below. Upload a file or use the sample image provided. This class was originally written by Csongor Zalatnai. You can get his original version here: http://www.phpclasses.org/browse/package/3370.html.
I added added some enhancements to this class:
- Allow you to select the quantization delta. The smaller the delta the more accurate the color. This also increases the number of similar colors though.
- Added a filter to reduce brightness variants of the same color.
- Added a filter to reduce gradient variants ( useful for logos ).
- Changed color counts to percentages.
You can download my version here
| Color | Color Code | Percentage | ![]() |
| f0a800 | 0.229702380952 | ||
| 606030 | 0.17505952381 | ||
| d87800 | 0.150476190476 | ||
| 484818 | 0.100952380952 | ||
| 901818 | 0.0767261904762 | ||
| 301818 | 0.0596428571429 | ||
| 787848 | 0.0458928571429 | ||
| c03018 | 0.0305357142857 | ||
| d86018 | 0.0275 | ||
| 181800 | 0.0232142857143 |
- Share:
- Digg
- Del.icio.us
