phpcolor / pico-colors
Pico Colors - PHP Color Palette
v0.1.2
2024-05-01 13:26 UTC
Requires
- php: >=8.3
README
This package provides access to the color palettes used in Pico CSS.
Installation
composer require phpcolor/pico-colors
Usage
Color names
use PhpColor\Colors\Pico\PicoColors as Pico; $colors = Pico::colors(); $names = $colors->getNames(); // 'red', 'pink', 'fuchsia', 'purple', 'violet', 'indigo' // 'blue', 'azure', 'cyan', 'jade', 'green', 'lime', 'yellow', // 'amber', 'pumpkin', 'orange', 'sand', 'gray', 'zinc'
Color shades
use PhpColor\Colors\Pico\PicoColors as Pico; $colors = Pico::colors(); $shades = $colors->getShades(); // 50, 100, 150, ... ,850, 900, 950
Color values
use PhpColor\Colors\Pico\PicoColors as Pico; $colors = Pico::colors(); echo $colors->azure; // #017fc0 echo $colors->azure(); // #017fc0 echo $colors->azure(500) // #017fc0 echo $colors->get('azure'); // #017fc0 echo $colors->get('azure', 500); // #017fc0
Credits
The colors listed in this project are based on the colors used by Pico.
License
This PHPColor package is released under the MIT license.