basekit / colortone
Generate a palette of the lightest, darkest, and most vibrant colors from a set
1.0.0
2019-02-01 16:22 UTC
Requires
- basekit/colorworks: ^1.0
Requires (Dev)
- phpunit/phpunit: ^7.5
This package is not auto-updated.
Last update: 2026-03-05 20:39:36 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" // }
