Download the PHP package myindexlike/color-extractor without Composer
On this page you can find all versions of the php package myindexlike/color-extractor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download myindexlike/color-extractor
More information about myindexlike/color-extractor
Files in myindexlike/color-extractor
Package color-extractor
Short Description Extract colors from an image as a human would do.
License MIT
Homepage https://github.com/myindexlike/color-extractor
Informations about the package color-extractor
ColorExtractor
Extract colors from an image like a human would do.
Install
Via Composer
Usage
Handling transparency
By default any pixel with alpha value greater than zero will be discarded. This is because transparent colors are not perceived
as is. For example fully transparent black would be seen white on a white background. So if you want to take transparency into account
when building a palette you have to specify this background color. You can do this with the second argument of Palette
constructors.
Its default value is null
, meaning a color won't be added to the palette if its alpha component exists and is greater than zero.
You can set it as an integer representing the color, then transparent colors will be blended before addition to the palette.
All versions of color-extractor with dependencies
ext-gd Version *