basekit / colortone
Generate a palette of the lightest, darkest, and most vibrant colors from a set
Installs: 32 032
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 12
Forks: 0
Open Issues: 0
Requires
- basekit/colorworks: ^1.0
Requires (Dev)
- phpunit/phpunit: ^7.5
This package is not auto-updated.
Last update: 2024-11-14 14:26:12 UTC
README
Installation
Through composer:
composer require basekit/colortone
Usage
$swatch = ['#FFFFFF', '#01B4F0', '#70C759', '#313748', '#888888']; $colorTone = new \ColorTone\ColorTone; $palette = $colorTone->generatePalette($swatch); var_dump($palette); // array(3) { // ["light"]=> // string(7) "#FFFFFF" // ["dark"]=> // string(7) "#313748" // ["vibrant"]=> // string(7) "#01B4F0" // }