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

This package is not auto-updated.

Last update: 2024-11-14 14:26:12 UTC


README

ColorTone

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"
// }