Download the PHP package skyree/php-colorpicker without Composer
On this page you can find all versions of the php package skyree/php-colorpicker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download skyree/php-colorpicker
More information about skyree/php-colorpicker
Files in skyree/php-colorpicker
Download skyree/php-colorpicker
More information about skyree/php-colorpicker
Files in skyree/php-colorpicker
Vendor skyree
Package php-colorpicker
Short Description Pick a palette of dominant colors within an image
License MIT
Homepage https://github.com/Skyree/php-colorpicker
Package php-colorpicker
Short Description Pick a palette of dominant colors within an image
License MIT
Homepage https://github.com/Skyree/php-colorpicker
Please rate this library. Is it a good library?
Informations about the package php-colorpicker
php-colorpicker
Pick a palette of dominant colors from an image
Requirements
- php 7.1
- ext-imagick
Installation
Clone or download the repository and simply run composer install
Demo
In order to use the demo, run the following command
And open the url localhost:8000
in your browser
Getting started
Use the Lol\ColorPicker\ColorPicker
class in your file
Example of usage:
Options
ColorPicker::pick($imageUrl, $algorithm, $paletteSize, $resize);
$imageUrl
is the url of the image you want to pick colors from$algorithm
is the algorithm to use amongColorPicker::KMEANS
,ColorPicker::WEIGHTED_KMEANS
,ColorPicker::LOCAL_MAXIMA
$paletteSize
is the maximum quantity of dominant colors you want to pick$resize
is the width to which the image should be resized, it can be left empty$quantization
is an array providing the colorspace and number of colors for the quantization, formatted as follow:
Algorithms
ColorPicker::KMEANS
uses a standard unsupervised Kmeans or Kmeans++ algorithm to calculate k clusters, some clusters can end up emptyColorPicker::WEIGHTED_KMEANS
implementation of Kmeans from an histogram, calculating the clusters centroids according to coordinate and weightColorPicker::LOCAL_MAXIMA
keeps the maximum values among their 27 neighboring cells in a 3d space of quantized rgb values. Incompatible with quantization argument !ColorPicker::QUANTIZATION
just quantize the colors and return the highest clusters
All versions of php-colorpicker with dependencies
PHP Build Version
Package Version
The package skyree/php-colorpicker contains the following files
Loading the files please wait ....