phpcolor / bootstrap-colors
Bootstrap Colors - PHP Color Palette
v0.1.2
2024-05-01 13:35 UTC
Requires
- php: >=8.3
README
This package provides access to the color palettes used in Bootstrap CSS.
Installation
composer require phpcolor/bootstrap-colors
Usage
Color names
use PhpColor\Colors\Bootstrap\PicoColors as Bootstrap; $colors = Bootstrap::colors(); $names = $colors->getNames(); // 'blue', 'indigo', 'purple', 'pink', 'red', 'orange' // 'yellow', 'green', 'teal', 'cyan', 'gray'
Color shades
use PhpColor\Colors\Bootstrap\PicoColors as Bootstrap; $colors = Bootstrap::colors(); $shades = $colors->getShades(); // 100, 200, 300, 400, 500, 600, 700, 800, 900
Color values
use PhpColor\Colors\Bootstrap\PicoColors as Bootstrap; $colors = Bootstrap::colors(); echo $colors->teal; // #14b8a6 echo $colors->teal(); // #14b8a6 echo $colors->teal(500) // #14b8a6 echo $colors->get('teal'); // #14b8a6 echo $colors->get('teal', 500); // #14b8a6
Credits
The colors listed in this project are based on the colors used by Bootstrap.
License
This PHPColor package is released under the MIT license.