Kévin Subileau

Espace personnel

Color Thief PHP

Grab the color palette from an image.
Uses PHP and GD or Imagick libraries to make it happen.

Download from GitHub


Examples

Dominant Color

$dominantColor = ColorThief::getColor("vegetables.jpg");

Palette

$palette = ColorThief::getPalette("vegetables.jpg");

Dominant Color

$dominantColor = ColorThief::getColor("rails.jpg");

Palette

$palette = ColorThief::getPalette("rails.jpg");