Method | Description | |
---|---|---|
__construct ( ) | Constructor | |
getColorPalette ( craft\AssetFileModel | string $image, $colorCount, $quality, $colorValue ) : array | Gets color palette for image | |
getDominantColor ( craft\AssetFileModel | string $image, $quality, $colorValue ) : boolean | string | Get dominant color of image | |
hex2rgb ( string $hex ) : array | Convert hex color to rgb | |
rgb2hex ( array $rgb ) : string | Convert rgb color to hex |
Method | Description | |
---|---|---|
_paletteToHex ( $palette ) : array | Convert palette to array of hex colors |
public getColorPalette ( craft\AssetFileModel | string $image, $colorCount, $quality, $colorValue ) : array | ||
$image | craft\AssetFileModel | string | |
$colorCount | ||
$quality | ||
$colorValue | ||
return | array |