phpcolor/bootstrap-colors

Bootstrap Colors - PHP Color Palette

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

This package is auto-updated.

Last update: 2024-12-01 00:12:05 UTC


README

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

Bootstrap Colors

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

Bootstrap Colors

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.