phpcolor/pico-colors

Pico Colors - PHP Color Palette

v0.1.2 2024-05-01 13:26 UTC

This package is auto-updated.

Last update: 2024-10-31 00:23:51 UTC


README

This package provides access to the color palettes used in Pico CSS.

Pico Colors

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

Pico Colors

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.