Grab the color palette from an image.
Uses PHP and GD or Imagick libraries to make it happen.
Uses PHP and GD or Imagick libraries to make it happen.
Examples
![](/wp-content/uploads/color-thief-examples/vegetables.jpg)
Dominant Color
$dominantColor = ColorThief::getColor("vegetables.jpg");
Palette
$palette = ColorThief::getPalette("vegetables.jpg");
![](/wp-content/uploads/color-thief-examples/rails.jpg)
Dominant Color
$dominantColor = ColorThief::getColor("rails.jpg");
Palette
$palette = ColorThief::getPalette("rails.jpg");