phpcolor / tailwind-colors
Tailwind Colors - PHP Color Palette
v0.1.2
2024-04-14 02:08 UTC
Requires
- php: >=8.3
README
This package provides access to the color palettes used in Tailwind interfaces.
Installation
composer require phpcolor/tailwind-colors
Usage
Color names
use PhpColor\Colors\Tailwind\TailwindColors as Tailwind; $colors = Tailwind::colors(); $names = $colors->getNames(); // 'gray', 'red', 'yellow', 'green', 'blue', 'indigo', 'purple', // 'pink', 'teal', 'orange', 'cyan', 'white', 'black'
Color shades
use PhpColor\Colors\Tailwind\TailwindColors as Tailwind; $colors = Tailwind::colors(); $shades = $colors->getShades(); // 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950
Color values
use PhpColor\Colors\Tailwind\TailwindColors as Tailwind; $colors = Tailwind::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 TailwindCss.
License
This PHPColor package is released under the MIT license.